ENH remove weird systemd mount thingies
This commit is contained in:
parent
6bf4ff0d7d
commit
7c5104b52f
|
@ -5,26 +5,7 @@
|
||||||
bin="$1"
|
bin="$1"
|
||||||
shift
|
shift
|
||||||
|
|
||||||
## TODO most of this stuff could be more easily done in the rofi-extras
|
alias="gnupg"
|
||||||
## haskell code where many of the edge cases that this is hoping to avoid are
|
|
||||||
## already strictly/brutally snuffed out by GHC's iron fist
|
|
||||||
|
|
||||||
notify_error () {
|
rofi-dev -c "$XDG_CONFIG_HOME/rofi/devices.yml" -m "$alias" \
|
||||||
notify-send --icon=dialog-error-symbolic "$1"
|
&& "$bin" "$@" || echo "Could not mount $alias"
|
||||||
}
|
|
||||||
|
|
||||||
notify_info () {
|
|
||||||
notify-send --icon=dialog-information-symbolic "$1"
|
|
||||||
}
|
|
||||||
|
|
||||||
if ! systemctl --user is-active --quiet mount-veracrypt@gnupg.service; then
|
|
||||||
if systemctl --user --quiet start mount-veracrypt@gnupg.service; then
|
|
||||||
notify_info "Mounted $GNUPGHOME"
|
|
||||||
"$bin" "$@"
|
|
||||||
else
|
|
||||||
notify_error "Could not mount gnupg directory"
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
else
|
|
||||||
"$bin" "$@"
|
|
||||||
fi
|
|
||||||
|
|
|
@ -1,8 +1,6 @@
|
||||||
[Unit]
|
[Unit]
|
||||||
Description=Mailbox synchronization service
|
Description=Mailbox synchronization service
|
||||||
After=network.target network-online.target dbus.socket mount-veracrypt@gnupg.service
|
After=network.target network-online.target dbus.socket mount-veracrypt@gnupg.service
|
||||||
# we need gpg keys which are stored in a Veracrypt volume
|
|
||||||
Requires=mount-veracrypt@gnupg.service
|
|
||||||
|
|
||||||
[Service]
|
[Service]
|
||||||
Type=oneshot
|
Type=oneshot
|
||||||
|
|
|
@ -1,7 +0,0 @@
|
||||||
[Unit]
|
|
||||||
Description=Mount sshfs directory for %i
|
|
||||||
|
|
||||||
[Service]
|
|
||||||
Type=forking
|
|
||||||
ExecStart=/usr/bin/sshfs ${TARGET} ${MOUNTPOINT}
|
|
||||||
ExecStop=/usr/bin/fusermount -u ${MOUNTPOINT}
|
|
|
@ -1,7 +0,0 @@
|
||||||
[Unit]
|
|
||||||
Requires=mount-veracrypt@ssh.service
|
|
||||||
After=mount-veracrypt@ssh.service
|
|
||||||
|
|
||||||
[Service]
|
|
||||||
Environment="TARGET=portnoy4prez:/mnt/data/home/Music"
|
|
||||||
Environment="MOUNTPOINT=/mnt/data/Music"
|
|
|
@ -1,7 +0,0 @@
|
||||||
[Unit]
|
|
||||||
Requires=mount-veracrypt@ssh.service
|
|
||||||
After=mount-veracrypt@ssh.service
|
|
||||||
|
|
||||||
[Service]
|
|
||||||
Environment="TARGET=portnoy4prez:/mnt/data/home/Videos"
|
|
||||||
Environment="MOUNTPOINT=/mnt/data/Videos"
|
|
|
@ -1,7 +0,0 @@
|
||||||
[Unit]
|
|
||||||
Description=Mount veracrypt volume for %i
|
|
||||||
|
|
||||||
[Service]
|
|
||||||
Type=forking
|
|
||||||
ExecStart=%h/.bin/mount.veracrypt ${BW_NAME} ${VOLUME} ${MOUNTPOINT}
|
|
||||||
ExecStop=%h/.bin/umount.veracrypt ${MOUNTPOINT}
|
|
|
@ -1,4 +0,0 @@
|
||||||
[Service]
|
|
||||||
Environment="BW_NAME=Veracrypt (gpg)"
|
|
||||||
Environment="VOLUME=/mnt/data/Documents/crypt/gnupg"
|
|
||||||
Environment="MOUNTPOINT=$GNUPGHOME"
|
|
|
@ -1,4 +0,0 @@
|
||||||
[Service]
|
|
||||||
Environment="BW_NAME=Veracrypt (ssh)"
|
|
||||||
Environment="VOLUME=/mnt/data/Documents/crypt/ssh-config"
|
|
||||||
Environment="MOUNTPOINT=%h/.ssh"
|
|
Loading…
Reference in New Issue