navy files for mounting /mnt/media through tailscale
This commit is contained in:
7
navy/etc/systemd/system/docker.service.d/override.conf
Normal file
7
navy/etc/systemd/system/docker.service.d/override.conf
Normal file
@@ -0,0 +1,7 @@
|
||||
[Unit]
|
||||
After=mnt-media.mount
|
||||
Wants=mnt-media.mount
|
||||
|
||||
|
||||
[Service]
|
||||
TimeoutStartSec=30
|
||||
13
navy/etc/systemd/system/mnt-media-monitor.service
Normal file
13
navy/etc/systemd/system/mnt-media-monitor.service
Normal file
@@ -0,0 +1,13 @@
|
||||
# /etc/systemd/system/mnt-media-monitor.service
|
||||
[Service]
|
||||
Type=oneshot
|
||||
ExecStart=/usr/bin/systemctl restart mnt-media.mount
|
||||
[Unit]
|
||||
Description=Persistent NFS Mount Watcher
|
||||
After=mnt-media.mount
|
||||
|
||||
[Service]
|
||||
Type=oneshot
|
||||
ExecStart=/bin/sh -c 'if ! mountpoint -q /mnt/media; then systemctl restart mnt-media.mount; fi'
|
||||
Nice=19
|
||||
IOSchedulingClass=idle
|
||||
11
navy/etc/systemd/system/mnt-media-monitor.timer
Normal file
11
navy/etc/systemd/system/mnt-media-monitor.timer
Normal file
@@ -0,0 +1,11 @@
|
||||
[Unit]
|
||||
Description=30s Mount Check Timer
|
||||
|
||||
[Timer]
|
||||
OnBootSec=1min
|
||||
OnUnitActiveSec=30s
|
||||
AccuracySec=1s
|
||||
RandomizedDelaySec=0
|
||||
|
||||
[Install]
|
||||
WantedBy=timers.target
|
||||
18
navy/etc/systemd/system/mnt-media.mount
Normal file
18
navy/etc/systemd/system/mnt-media.mount
Normal file
@@ -0,0 +1,18 @@
|
||||
[Unit]
|
||||
Description=Persistent NFS Media Share via Tailscale
|
||||
After=tailscaled.service systemd-resolved.service network-online.target
|
||||
Requires=tailscaled.service
|
||||
ConditionPathExists=/var/run/tailscale/tailscaled.sock
|
||||
ConditionPathExists=/run/systemd/resolve/stub-resolv.conf
|
||||
StartLimitIntervalSec=0
|
||||
|
||||
[Mount]
|
||||
What=sdb-share:/mnt/sdb/media
|
||||
Where=/mnt/media
|
||||
Type=nfs
|
||||
Options=_netdev,noatime,soft,timeo=30,retrans=5,retry=0,proto=tcp,vers=4.2,fg
|
||||
TimeoutSec=30
|
||||
LazyUnmount=true
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
Reference in New Issue
Block a user