aboutsummaryrefslogtreecommitdiffstats
path: root/signal-desktop
diff options
context:
space:
mode:
Diffstat (limited to 'signal-desktop')
-rw-r--r--signal-desktop/Makefile2
-rw-r--r--signal-desktop/bash-aliases3
2 files changed, 3 insertions, 2 deletions
diff --git a/signal-desktop/Makefile b/signal-desktop/Makefile
index c0da6aa..36108fd 100644
--- a/signal-desktop/Makefile
+++ b/signal-desktop/Makefile
@@ -5,7 +5,7 @@ install:
test -f ~/.var/signal/SignalCrypt.img
test -f ~/.var/signal/SignalCrypt.key
mkdir -p -- ~/.var/signal/SignalCrypt.d
- test -e ~/.config/Signal || ln -s -- ../.var/signal/SignalCrypt.d/Signal ~/.config/Signal
+ test -e ~/.config/Signal || ln -sf -- ../.var/signal/SignalCrypt.d/Signal ~/.config/Signal
$(CHECK_INSTALLED) asroot
$(CHECK_INSTALLED) gnupg
$(CHECK_INSTALLED) cryptsetup
diff --git a/signal-desktop/bash-aliases b/signal-desktop/bash-aliases
index 34a23b9..1e7b01c 100644
--- a/signal-desktop/bash-aliases
+++ b/signal-desktop/bash-aliases
@@ -1,10 +1,11 @@
# -*- shell-script -*-
mount-signal () {
+ gpg --decrypt ~/.var/signal/SignalCrypt.key | \
asroot env XDG_RUNTIME_DIR="${XDG_RUNTIME_DIR}" SIGNAL_DIR=~/.var/signal sh -ec '
device="$(losetup --show -f -P "${SIGNAL_DIR}/SignalCrypt.img")"
printf "%s\n" "${device}" > "${XDG_RUNTIME_DIR}/SignalCrypt"
- gpg --decrypt "${SIGNAL_DIR}/SignalCrypt.key" | cryptsetup -d - open "${device}" SignalCrypt
+ cryptsetup -d - open "${device}" SignalCrypt
mount /dev/mapper/SignalCrypt "${SIGNAL_DIR}/SignalCrypt.d"
'
}