7 # Required-Start: $network $remote_fs $syslog
11 # Description: Starts internet name service masq caching server (DNS)
14 NAMED_BIN
=/usr
/sbin
/dnsmasq
15 NAMED_PID
=/var
/run
/dnsmasq.pid
16 NAMED_CONF
=/etc
/dnsmasq.conf
18 if [ ! -x $NAMED_BIN ] ; then
19 echo -n "dnsmasq not installed ! "
28 echo -n "Starting name service masq caching server "
29 checkproc
-p $NAMED_PID $NAMED_BIN
30 if [ $?
-eq 0 ] ; then
31 echo -n "- Warning: dnsmasq already running ! "
33 [ -e $NAMED_PID ] && echo -n "- Warning: $NAMED_PID exists ! "
35 startproc
-p $NAMED_PID $NAMED_BIN -u nobody
39 echo -n "Shutting name service masq caching server "
40 checkproc
-p $NAMED_PID $NAMED_BIN
41 [ $?
-ne 0 ] && echo -n "- Warning: dnsmasq not running ! "
42 killproc
-p $NAMED_PID -TERM $NAMED_BIN
59 echo -n "Reloading name service masq caching server "
60 checkproc
-p $NAMED_PID $NAMED_BIN
61 [ $?
-ne 0 ] && echo -n "- Warning: dnsmasq not running ! "
62 killproc
-p $NAMED_PID -HUP $NAMED_BIN
66 echo -n "Checking for name service masq caching server "
67 checkproc
-p $NAMED_PID $NAMED_BIN
71 test $NAMED_CONF -nt $NAMED_PID && echo reload
74 echo "Usage: $0 {start|stop|status|try-restart|restart|force-reload|reload|probe}"