Skip to content

Commit

Permalink
Update hetzner_ddns.init
Browse files Browse the repository at this point in the history
Run with supervise-daemon as user daemon.
  • Loading branch information
thenktor authored Feb 21, 2023
1 parent bbb3659 commit 0702ea2
Showing 1 changed file with 12 additions and 5 deletions.
17 changes: 12 additions & 5 deletions hetzner_ddns.init
Original file line number Diff line number Diff line change
@@ -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
}

0 comments on commit 0702ea2

Please sign in to comment.