diff options
author | Mattias Andrée <maandree@kth.se> | 2022-04-26 22:50:50 +0200 |
---|---|---|
committer | Mattias Andrée <maandree@kth.se> | 2022-04-26 22:50:50 +0200 |
commit | 16f7d08bcaf01c40ccaad688a8709bfced68b10e (patch) | |
tree | d8e30f7cca448e8057d0110c74582217c22ee0ab /wire-desktop/bash-aliases | |
parent | emacs: restore comment colour to red (diff) | |
download | dotfiles-16f7d08bcaf01c40ccaad688a8709bfced68b10e.tar.gz dotfiles-16f7d08bcaf01c40ccaad688a8709bfced68b10e.tar.bz2 dotfiles-16f7d08bcaf01c40ccaad688a8709bfced68b10e.tar.xz |
Use losetup -d instead of --detach and add clean up
Signed-off-by: Mattias Andrée <maandree@kth.se>
Diffstat (limited to '')
-rw-r--r-- | wire-desktop/bash-aliases | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/wire-desktop/bash-aliases b/wire-desktop/bash-aliases index 09f4733..0fe1b9e 100644 --- a/wire-desktop/bash-aliases +++ b/wire-desktop/bash-aliases @@ -14,6 +14,7 @@ umount-wire () { asroot env XDG_RUNTIME_DIR="${XDG_RUNTIME_DIR}" WIRE_DIR=~/.var/opt/wire sh -c ' umount "${WIRE_DIR}/WireCrypt.d" cryptsetup close WireCrypt - losetup --detach "$(cat -- "${XDG_RUNTIME_DIR}/WireCrypt")" + losetup -d "$(cat -- "${XDG_RUNTIME_DIR}/WireCrypt")" + rm -f -- "${XDG_RUNTIME_DIR}/WireCrypt" ' } |