aports/testing/minidyndns/minidyndns.initd
Martin Rusko 0ffbcc6e5d testing/minidyndns: new aport
https://github.com/arkanis/minidyndns
A simple no fuss DNS server with built-in HTTP/HTTPS interface to update IPs

Changes v2 -> v3:
 - default minidyndns_opts are set in the initd script
 - stop() function in the initd script has been replaced with 'stopsig'
   variable
 - bumped release
2019-02-05 10:34:45 +00:00

25 lines
611 B
Bash

#!/sbin/openrc-run
_logdir="/var/log/${RC_SVCNAME}"
command="ruby /usr/share/minidyndns/dns.rb"
command_args="${minidyndns_opts:="--config /etc/minidyndns_config.yml --db /var/lib/minidyndns/db.yml"}"
command_background="yes"
description_reload="Reloading configuration"
extra_started_commands="reload"
start_stop_daemon_args="--stdout $_logdir/access.log --stderr $_logdir/error.log"
stopsig="SIGINT"
pidfile="/run/${RC_SVCNAME}.pid"
depend() {
need net
after firewall
}
reload() {
ebegin "Reloading ${RC_SVCNAME}"
start-stop-daemon --exec "$command" \
--pidfile "$pidfile" --signal USR1
eend $?
}