aboutsummaryrefslogblamecommitdiffstats
path: root/main/gdnsd/gdnsd.initd
blob: 2dbb568974b238f9081283741a67d2cd249da265 (plain) (tree)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16

                 













                                                                                                              

                
                  
                      
                        

 


                                                             


               



                            
         








                                              
 
#!/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
}

act() {
	ebegin "$1 ${SVCNAME}"
	/usr/sbin/gdnsd -c ${GDNSD_CONFFILE} ${GDNSD_OPTS} $2
	eend $?
}

start() {
	act "Starting" start
}

stop () {
	act "Stopping" stop
}

reload() {
	act "Reloading" restart
}

configtest() {
	act "Checking configuration" checkconf
}