diff --git a/systemd/cloudflare-ddns.service b/systemd/cloudflare-ddns.service new file mode 100644 index 0000000..e5c0692 --- /dev/null +++ b/systemd/cloudflare-ddns.service @@ -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 diff --git a/systemd/cloudflare-ddns.timer b/systemd/cloudflare-ddns.timer new file mode 100644 index 0000000..cc9cd61 --- /dev/null +++ b/systemd/cloudflare-ddns.timer @@ -0,0 +1,9 @@ +[Unit] +Description=Update DDNS on Cloudflare every 15 minutes + +[Timer] +OnBootSec=2min +OnUnitActiveSec=15m + +[Install] +WantedBy=timers.target