aports/community/gdnsd/gdnsd.initd
2022-05-12 02:09:47 +00:00

36 lines
644 B
Bash
Executable File

#!/sbin/openrc-run
name="gdnsd daemon"
extra_commands="checkconf"
extra_started_commands="reload"
description="Geographic Authoritative DNS server"
description_configtest="Run syntax tests for configuration files only"
description_reload="Reload zone data"
command_background=true
pidfile=/var/run/${RC_SVCNAME}.pid
command="/usr/sbin/gdnsd"
command_args="start"
depend() {
need net
use logger
after firewall
provide auth-dns
}
checkconf() {
ebegin "Checking configuration of ${RC_SVCNAME}"
gdnsd checkconf
eend $?
}
stop_pre() {
checkconf
}
reload() {
ebegin "Reloading ${RC_SVCNAME} zone data"
gdnsdctl reload-zones
eend $?
}