diff options
author | David Vazgenovich Shakaryan <dvshakaryan@gmail.com> | 2022-12-08 18:42:54 -0800 |
---|---|---|
committer | David Vazgenovich Shakaryan <dvshakaryan@gmail.com> | 2022-12-08 18:42:54 -0800 |
commit | 7d5817dfcd5f93e56f770353059ba845314f9646 (patch) | |
tree | a270440c61531e6560af7f480f798ae8324313d6 | |
parent | 27c3a59dc75c2bf4ec90b2ef752939124618dffa (diff) | |
download | hetzner-ddns-7d5817dfcd5f93e56f770353059ba845314f9646.tar.gz hetzner-ddns-7d5817dfcd5f93e56f770353059ba845314f9646.tar.xz |
add systemd service and timer
-rw-r--r-- | systemd/linode-ddns@.service | 6 | ||||
-rw-r--r-- | systemd/linode-ddns@.timer | 9 | ||||
-rw-r--r-- | systemd/linode-ddns@home.example.org.service.d/opts.conf | 4 |
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" |