You are not logged in.
Hello,
I want to leverage systemd automounting under systemd --user for sshfs and encfs mounts
I'd like to have the configuration stored in $HOME
The users ssh keys are used for sshfs
The users keyring stores encfs keys
The encfs mounts depend on the sshfs mount
psuedo units;
# ~/.config/systemd/user/sshfs.mount
[Unit]
Description=sshfs mount
Requires=network-online.service
After=network-online.service
[Mount]
What=192.168.1.x:/example
Where=$HOME/mnt/example
Type=sshfs
[Install]
WantedBy=multi-user.target
# ~/.config/systemd/user/sshfs.automount
[Automount]
Where=$HOME/mnt/example
# ~/.config/systemd/user/encfs.service
[Unit]
Description=encfs mount
Requires=sshfs.mount
[Service]
Type=oneshot
ExecStart=/usr/bin/encfs $HOME/mnt/example/encrypted $HOME/mnt/encrypted
I realize fuse systems (that don't specfically use `mount` as a command, won't work for systemd .mount units)
I'm unsure if there's any way to have a systemd --user .service unit fire when a directory is accessed?
Or associated a .automount and a .service?
Any hints?
Offline