Merge pull request #121 from davide125/systemd
Add systemd service and timer
This commit is contained in:
commit
c135a7d343
13
systemd/cloudflare-ddns.service
Normal file
13
systemd/cloudflare-ddns.service
Normal 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
|
||||||
9
systemd/cloudflare-ddns.timer
Normal file
9
systemd/cloudflare-ddns.timer
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
[Unit]
|
||||||
|
Description=Update DDNS on Cloudflare every 15 minutes
|
||||||
|
|
||||||
|
[Timer]
|
||||||
|
OnBootSec=2min
|
||||||
|
OnUnitActiveSec=15m
|
||||||
|
|
||||||
|
[Install]
|
||||||
|
WantedBy=timers.target
|
||||||
Reference in New Issue
Block a user