Add systemd service and timer
This commit is contained in:
parent
7e6d74f1f6
commit
2c2e929d17
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