systemd services
Mount remote directory with sshfs
only after tailscale
has started and is connected.
[Unit]
Description=Mount games with sshfs
After=tailscaled.service
Wants=tailscaled.service
StartLimitIntervalSec=300
StartLimitBurst=10
[Install]
WantedBy=default.target
[Service]
Type=exec
#ExecStart=/usr/bin/sshfs -f user@ip:/mnt/storage/games /home/foo_user/Games
ExecStart=/usr/bin/sshfs -f server:/mnt/storage/games /home/foo_user/Games
execStop=/usr/bin/umount /home/foo_user/Games
Restart=on-failure
RestartSec=20
[Unit]
Description=Mount games with sshfs
After=tailscaled.service
Wants=tailscaled.service
StartLimitIntervalSec=300
StartLimitBurst=10
[Install]
WantedBy=default.target
[Service]
Type=exec
#ExecStart=/usr/bin/sshfs -f user@ip:/mnt/storage/games /home/foo_user/Games
ExecStart=/usr/bin/sshfs -f server:/mnt/storage/games /home/foo_user/Games
execStop=/usr/bin/umount /home/foo_user/Games
Restart=on-failure
RestartSec=20
Don't start Docker unless ZFS has started.
[Unit]
Description=Wait for ZFS before starting Docker
RequiredBy=docker.service
Before=docker.service
Requires=zfs.target
After=zfs.target
[Service]
Type=oneshot
ExecStart=/bin/true
RemainAfterExit=yes
[Install]
WantedBy=multi-user.target
[Unit]
Description=Wait for ZFS before starting Docker
RequiredBy=docker.service
Before=docker.service
Requires=zfs.target
After=zfs.target
[Service]
Type=oneshot
ExecStart=/bin/true
RemainAfterExit=yes
[Install]
WantedBy=multi-user.target
ZFS load key
[Unit]
Description=Load encryption keys
DefaultDependencies=no
After=zfs-import.target
Before=zfs-mount.service
[Service]
Type=oneshot
RemainAfterExit=yes
ExecStart=/usr/sbin/zfs load-key -a
StandardInput=tty-force
[Install]
WantedBy=zfs-mount.service