aboutsummaryrefslogtreecommitdiffstats
path: root/testing/minidyndns/minidyndns.initd
blob: e92da233e6e18f91b41d5082a81ab904f6a6596b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
#!/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 $?
}