aboutsummaryrefslogtreecommitdiffstats
path: root/wire-desktop/umount-wire
diff options
context:
space:
mode:
Diffstat (limited to 'wire-desktop/umount-wire')
-rwxr-xr-xwire-desktop/umount-wire7
1 files changed, 6 insertions, 1 deletions
diff --git a/wire-desktop/umount-wire b/wire-desktop/umount-wire
index 796ea05..ce7f0c0 100755
--- a/wire-desktop/umount-wire
+++ b/wire-desktop/umount-wire
@@ -1,6 +1,11 @@
#!/bin/dash
-asroot env \
+asroot=asroot
+if ! isfg; then
+ asroot=gasroot
+fi
+
+$asroot env \
WIRE_DIR="${HOME}/.var/opt/wire" \
WIRE_DEV="$(losetup | sed 's/\s\+/ /g' | cut -d ' ' -f 1,6 | \
sed -n 's#\(/[^ ]*\) '"$(realpath -- "${HOME}/.var/opt/wire/WireCrypt.img")"'$#\1#p' | sed 1q)" \