Added template systemd files

master
Keith Irwin 2023-11-03 19:32:03 -06:00
parent b801aec790
commit 8667658bf6
Signed by: ki9
GPG Key ID: DF773B3F4A88DA86
2 changed files with 29 additions and 0 deletions

View File

@ -0,0 +1,15 @@
[Unit]
Description=Update SSHFP records for %s
Documentation=https://gitea.gf4.pw/ki9/nsupdate-sshfp
Requires=named.service
Wants=nsupdate-sshfp@%i
[Service]
Type=oneshot
Environment=DOMAIN=%i
Environment=TTL=86400
Environment=TSIG=hmac-sha512:mykeyname:XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX==
ExecStart=/usr/local/bin/nsupdate-sshfp ${DOMAIN} ${TTL} ${TSIG}
[Install]
WantedBy=multi-user.target

View File

@ -0,0 +1,14 @@
[Unit]
Description=Daily update of SSHFS records for %i
Documentation=https://gitea.gf4.pw/ki9/nsupdate-sshfp
Requires=nsupdate-sshfp@%i.service named.service
[Timer]
# Run 5 minutes after boot
OnBootSec=5m
# Run every 1 day thereafter
OnUnitActiveSec=1d
Unit=nsupdate-sshfp@%i.service
[Install]
WantedBy=timers.target