Merge pull request #121 from davide125/systemd

Add systemd service and timer
This commit is contained in:
Timothy Miller 2023-02-15 15:39:26 -05:00 committed by GitHub
commit c135a7d343
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 22 additions and 0 deletions

View File

@ -0,0 +1,13 @@
[Unit]
Description=Update DDNS on Cloudflare
ConditionPathExists=/etc/cloudflare-ddns/config.json
Wants=network-online.target
After=network-online.target
[Service]
Type=oneshot
Environment=CONFIG_PATH=/etc/cloudflare-ddns
ExecStart=cloudflare-ddns
[Install]
WantedBy=multi-user.target

View File

@ -0,0 +1,9 @@
[Unit]
Description=Update DDNS on Cloudflare every 15 minutes
[Timer]
OnBootSec=2min
OnUnitActiveSec=15m
[Install]
WantedBy=timers.target