diff options
| author | Mattias Andrée <m@maandree.se> | 2026-03-20 18:33:03 +0100 |
|---|---|---|
| committer | Mattias Andrée <m@maandree.se> | 2026-03-20 18:33:03 +0100 |
| commit | 0ef0abf62c0a9f1c083ae00f39b4149d4b8e98cb (patch) | |
| tree | 85dc151bac93a19e95916424974eee4b249ac340 /element-desktop/umount-element | |
| parent | Use yellow colour on hostname if logged in remotely (diff) | |
| download | dotfiles-0ef0abf62c0a9f1c083ae00f39b4149d4b8e98cb.tar.gz dotfiles-0ef0abf62c0a9f1c083ae00f39b4149d4b8e98cb.tar.bz2 dotfiles-0ef0abf62c0a9f1c083ae00f39b4149d4b8e98cb.tar.xz | |
Use gasroot instead of asroot when not in foreground
Signed-off-by: Mattias Andrée <m@maandree.se>
Diffstat (limited to '')
| -rwxr-xr-x | element-desktop/umount-element | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/element-desktop/umount-element b/element-desktop/umount-element index 44d425b..ddfc602 100755 --- a/element-desktop/umount-element +++ b/element-desktop/umount-element @@ -1,6 +1,11 @@ #!/bin/dash -asroot env \ +asroot=asroot +if ! isfg; then + asroot=gasroot +fi + +$asroot env \ ELEMENT_DIR="${HOME}/.var/opt/element" \ ELEMENT_DEV="$(losetup | sed 's/\s\+/ /g' | cut -d ' ' -f 1,6 | \ sed -n 's#\(/[^ ]*\) '"$(realpath -- "${HOME}/.var/opt/element/ElementCrypt.img")"'$#\1#p' | sed 1q)" \ |
