mirror of
https://gitlab.alpinelinux.org/alpine/aports.git
synced 2025-08-05 13:27:09 +02:00
47 lines
801 B
Plaintext
Executable File
47 lines
801 B
Plaintext
Executable File
#!/sbin/openrc-run
|
|
|
|
name="gdnsd daemon"
|
|
extra_commands="configtest"
|
|
extra_started_commands="reload fastrestart"
|
|
description="Geographic Authoritative DNS server"
|
|
description_configtest="Run syntax tests for configuration files only."
|
|
description_reload="Signal running gdnsd to reload configuration files"
|
|
description_fastrestart="Optimized restart sequence (minimizes down time)"
|
|
|
|
|
|
depend() {
|
|
need net
|
|
use logger
|
|
after firewall
|
|
provide auth-dns
|
|
}
|
|
|
|
act() {
|
|
ebegin "$1 ${SVCNAME}"
|
|
/usr/sbin/gdnsd $2
|
|
eend $?
|
|
}
|
|
|
|
configtest() {
|
|
act "Checking configuration" checkconf
|
|
}
|
|
|
|
start() {
|
|
act "Starting" start
|
|
}
|
|
|
|
stop () {
|
|
if [ "${RC_CMD}" = "restart" ]; then
|
|
configtest || return 1
|
|
fi
|
|
act "Stopping" stop
|
|
}
|
|
|
|
restart() {
|
|
act "Restarting" restart
|
|
}
|
|
|
|
reload-zones() {
|
|
act "Reloading" reload-zones
|
|
}
|