From 1357517ecf7706c453c1c2d37ce45f81f9c44ea1 Mon Sep 17 00:00:00 2001 From: Mattias Andrée Date: Fri, 25 Jun 2021 16:28:08 +0200 Subject: Improve signal-desktop confs and add element-desktop and wire-desktop confs MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Mattias Andrée --- wire-desktop/bash-aliases | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 wire-desktop/bash-aliases (limited to 'wire-desktop/bash-aliases') diff --git a/wire-desktop/bash-aliases b/wire-desktop/bash-aliases new file mode 100644 index 0000000..00cd7a1 --- /dev/null +++ b/wire-desktop/bash-aliases @@ -0,0 +1,18 @@ +# -*- shell-script -*- + +mount-wire () { + asroot env XDG_RUNTIME_DIR="${XDG_RUNTIME_DIR}" WIRE_DIR=~/.var/wire sh -ec ' + device="$(losetup --show -f -P "${WIRE_DIR}/WireCrypt.img")" + printf "%s\n" "${device}" > "${XDG_RUNTIME_DIR}/WireCrypt" + gpg --decrypt "${WIRE_DIR}/WireCrypt.key" | cryptsetup -d - open "${device}" WireCrypt + mount /dev/mapper/WireCrypt "${WIRE_DIR}/WireCrypt.d" + ' +} + +umount-wire () { + asroot env XDG_RUNTIME_DIR="${XDG_RUNTIME_DIR}" WIRE_DIR=~/.var/wire sh -c ' + umount "${WIRE_DIR}/WireCrypt.d" + cryptsetup close WireCrypt + losetup --detach "$(cat -- "${XDG_RUNTIME_DIR}/WireCrypt")" + ' +} -- cgit v1.2.3-70-g09d2