summaryrefslogtreecommitdiff
path: root/systemd
diff options
context:
space:
mode:
Diffstat (limited to 'systemd')
-rw-r--r--systemd/hetzner-ddns@.service5
-rw-r--r--systemd/hetzner-ddns@home.example.org.service.d/opts.conf2
2 files changed, 3 insertions, 4 deletions
diff --git a/systemd/hetzner-ddns@.service b/systemd/hetzner-ddns@.service
index 28a25fd..58e6e6f 100644
--- a/systemd/hetzner-ddns@.service
+++ b/systemd/hetzner-ddns@.service
@@ -2,6 +2,7 @@
Description=Hetzner DDNS updater
[Service]
-Type=oneshot
-ExecStart=hetzner-ddns.sh %i
+ExecStart=hetzner-ddns.sh %I
DynamicUser=yes
+LoadCredentialEncrypted=hetzner_token.cred
+Environment=HETZNER_TOKEN_FILE=%d/hetzner_token.cred
diff --git a/systemd/hetzner-ddns@home.example.org.service.d/opts.conf b/systemd/hetzner-ddns@home.example.org.service.d/opts.conf
deleted file mode 100644
index 1e62794..0000000
--- a/systemd/hetzner-ddns@home.example.org.service.d/opts.conf
+++ /dev/null
@@ -1,2 +0,0 @@
-[Service]
-Environment="HETZNER_TOKEN=access_token"