forked from filiparag/hetzner_ddns
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Run with supervise-daemon as user daemon.
- Loading branch information
Showing
1 changed file
with
12 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | ||
} |