summaryrefslogtreecommitdiffstats
path: root/main/gdnsd/gdnsd.initd
diff options
context:
space:
mode:
authorTimo Teräs <timo.teras@iki.fi>2012-05-09 16:06:22 +0300
committerTimo Teräs <timo.teras@iki.fi>2012-05-09 16:07:06 +0300
commit1952e27109df343f47ca5f7c5e4052f9394918e0 (patch)
treec5660e459b4315a60a6064472ad898ce830ae32a /main/gdnsd/gdnsd.initd
parent30b76125f85c4ed7cf83ea84c96517c6395eb7bc (diff)
downloadaports-1952e27109df343f47ca5f7c5e4052f9394918e0.tar.bz2
aports-1952e27109df343f47ca5f7c5e4052f9394918e0.tar.xz
main/gdnsd: upgrade to 1.6.5 and update init.d
Diffstat (limited to 'main/gdnsd/gdnsd.initd')
-rwxr-xr-xmain/gdnsd/gdnsd.initd38
1 files changed, 32 insertions, 6 deletions
diff --git a/main/gdnsd/gdnsd.initd b/main/gdnsd/gdnsd.initd
index e11a73d1d..2dbb56897 100755
--- a/main/gdnsd/gdnsd.initd
+++ b/main/gdnsd/gdnsd.initd
@@ -1,18 +1,44 @@
#!/sbin/runscript
+name="gdnsd daemon"
+extra_commands="configtest"
+extra_started_commands="reload"
+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)."
+
+if [ -z "${GDNSD_CONFFILE}" ]; then
+ if [ "${SVCNAME}" = "gdnsd" ]; then
+ GDNSD_CONFFILE=/etc/gdnsd/config
+ else
+ GDNSD_CONFFILE=/etc/gdnsd/${SVCNAME}.config
+ fi
+fi
+
depend() {
need net
+ use logger
after firewall
+ provide auth-dns
}
-start() {
- ebegin "Starting dnsd"
- start-stop-daemon --start --exec /usr/sbin/dnsd -- -d $DNSD_OPTS
+act() {
+ ebegin "$1 ${SVCNAME}"
+ /usr/sbin/gdnsd -c ${GDNSD_CONFFILE} ${GDNSD_OPTS} $2
eend $?
}
+start() {
+ act "Starting" start
+}
+
stop () {
- ebegin "Stopping dnsd"
- start-stop-daemon --stop --exec /usr/sbin/dnsd
- eend $?
+ act "Stopping" stop
+}
+
+reload() {
+ act "Reloading" restart
+}
+
+configtest() {
+ act "Checking configuration" checkconf
}