summaryrefslogtreecommitdiff
path: root/systemd
diff options
context:
space:
mode:
Diffstat (limited to 'systemd')
-rw-r--r--systemd/linode-ddns@.service6
-rw-r--r--systemd/linode-ddns@.timer9
-rw-r--r--systemd/linode-ddns@home.example.org.service.d/opts.conf4
3 files changed, 19 insertions, 0 deletions
diff --git a/systemd/linode-ddns@.service b/systemd/linode-ddns@.service
new file mode 100644
index 0000000..35905b4
--- /dev/null
+++ b/systemd/linode-ddns@.service
@@ -0,0 +1,6 @@
+[Unit]
+Description=Linode DDNS updater
+
+[Service]
+Type=oneshot
+ExecStart=linode-ddns.sh "${DOMAIN}" "${RECORD}"
diff --git a/systemd/linode-ddns@.timer b/systemd/linode-ddns@.timer
new file mode 100644
index 0000000..d87ed06
--- /dev/null
+++ b/systemd/linode-ddns@.timer
@@ -0,0 +1,9 @@
+[Unit]
+Description=Regular updates of Linode DDNS
+
+[Timer]
+OnBootSec=2m
+OnUnitActiveSec=30m
+
+[Install]
+WantedBy=timers.target
diff --git a/systemd/linode-ddns@home.example.org.service.d/opts.conf b/systemd/linode-ddns@home.example.org.service.d/opts.conf
new file mode 100644
index 0000000..da136e7
--- /dev/null
+++ b/systemd/linode-ddns@home.example.org.service.d/opts.conf
@@ -0,0 +1,4 @@
+[Service]
+Environment="LINODE_TOKEN=access_token"
+Environment="DOMAIN=example.org"
+Environment="RECORD=home"