From 0702ea2c09d66c1274c36875ae8bc9437f616f38 Mon Sep 17 00:00:00 2001 From: Thorsten Date: Tue, 21 Feb 2023 15:52:02 +0100 Subject: [PATCH] Update hetzner_ddns.init Run with supervise-daemon as user daemon. --- hetzner_ddns.init | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/hetzner_ddns.init b/hetzner_ddns.init index fe8927b..d2d2b53 100644 --- a/hetzner_ddns.init +++ b/hetzner_ddns.init @@ -1,14 +1,21 @@ #!/sbin/openrc-run +supervisor=supervise-daemon +respawn_delay=10 + +name="Hetzner Dynamic DNS Daemon" +description="A simple daemon to continuously update Hetzner DNS A and AAAA records for your server with a dynamic IP address" + +command="/usr/local/bin/${RC_SVCNAME}" +command_user=daemon:daemon + depend() { need net use dns netmount after bootmisc } -command="/usr/local/bin/${RC_SVCNAME}" -pidfile="/var/run/${RC_SVCNAME}.pid" - -start() { - "$command" --daemon +start_pre() { + touch /var/log/hetzner_ddns.log + chown daemon:daemon /var/log/hetzner_ddns.log /usr/local/etc/hetzner_ddns.conf }