18 lines
632 B
SYSTEMD
18 lines
632 B
SYSTEMD
|
|
# /etc/systemd/system/wireguard-backup.service (rpi)
|
||
|
|
#
|
||
|
|
# Hub state -> Linode VPS. The peer set and the wg0 server key are the one
|
||
|
|
# thing on the Pi that neither Flux nor a git repo can rebuild; a Pi disk loss
|
||
|
|
# would otherwise take remote access with it.
|
||
|
|
[Unit]
|
||
|
|
Description=WireGuard hub state (etc/wireguard + wgportal sqlite) -> Linode VPS
|
||
|
|
After=network-online.target docker.service
|
||
|
|
Wants=network-online.target
|
||
|
|
|
||
|
|
[Service]
|
||
|
|
Type=oneshot
|
||
|
|
ExecStart=/usr/local/sbin/wireguard-backup.sh
|
||
|
|
# A slow tunnel is not a reason to retry a small job forever.
|
||
|
|
TimeoutStartSec=10min
|
||
|
|
Nice=10
|
||
|
|
# The tarball is an archive of private keys.
|
||
|
|
UMask=0077
|