aboutsummaryrefslogtreecommitdiffstats
path: root/main/gdnsd/gdnsd.initd
diff options
context:
space:
mode:
Diffstat (limited to 'main/gdnsd/gdnsd.initd')
-rwxr-xr-xmain/gdnsd/gdnsd.initd27
1 files changed, 18 insertions, 9 deletions
diff --git a/main/gdnsd/gdnsd.initd b/main/gdnsd/gdnsd.initd
index 2dbb568974..9820052bee 100755
--- a/main/gdnsd/gdnsd.initd
+++ b/main/gdnsd/gdnsd.initd
@@ -2,15 +2,17 @@
name="gdnsd daemon"
extra_commands="configtest"
-extra_started_commands="reload"
+extra_started_commands="reload fastrestart"
+description="Geographic Authoritative DNS server"
description_configtest="Run syntax tests for configuration files only."
-description_reload="Fast reload: check config, load files, kill old server, start new server (in this order)."
+description_reload="Signal running gdnsd to reload configuration files"
+description_fastrestart="Optimized restart sequence (minimizes down time)"
if [ -z "${GDNSD_CONFFILE}" ]; then
if [ "${SVCNAME}" = "gdnsd" ]; then
- GDNSD_CONFFILE=/etc/gdnsd/config
+ GDNSD_ROOT=system
else
- GDNSD_CONFFILE=/etc/gdnsd/${SVCNAME}.config
+ GDNSD_ROOT=/var/gdnsd/${SVCNAME}
fi
fi
@@ -23,22 +25,29 @@ depend() {
act() {
ebegin "$1 ${SVCNAME}"
- /usr/sbin/gdnsd -c ${GDNSD_CONFFILE} ${GDNSD_OPTS} $2
+ /usr/sbin/gdnsd -d ${GDNSD_ROOT} $2
eend $?
}
+configtest() {
+ act "Checking configuration" checkconf
+}
+
start() {
act "Starting" start
}
stop () {
+ if [ "${RC_CMD}" = "restart" ]; then
+ configtest || return 1
+ fi
act "Stopping" stop
}
-reload() {
- act "Reloading" restart
+fastrestart() {
+ act "Restarting" restart
}
-configtest() {
- act "Checking configuration" checkconf
+reload() {
+ act "Reloading" reload
}