2 # pdns This is controller stript for PowerDNS name server.
6 # description: pdns is is a Domain Name Server (DNS) \
7 # that is used to resolve host names to IP addresses.
9 # Source function library
10 . /etc/rc.d/init.d/functions
12 # Source networking configuration
13 . /etc/sysconfig/network
15 # Check that networking is up.
16 if is_no "${NETWORKING}"; then
17 msg_network_down "pdns"
26 suffix=`basename $0 | awk -F- '{print $2}'`
29 EXTRAOPTS=--config-name=$suffix
35 pdns_server="/usr/sbin/pdns_server $EXTRAOPTS"
38 ret=$(/usr/sbin/pdns_control $EXTRAOPTS $1 $2 2> /dev/null)
41 if [ "$1" != "mrtg" -a "$1" != "cricket" ]
51 if test "$NOTRUNNING" = "0"
61 if test "$NOTRUNNING" = "0"
71 killall -v -9 pdns_server
75 if test "$NOTRUNNING" = "0"
77 echo "already running"
79 $pdns_server --daemon --guardian=yes
87 force-reload | restart)
88 echo -n stopping and waiting
96 if test "$NOTRUNNING" = "0"
107 if test "$NOTRUNNING" = "0"
109 echo "already running"
111 $pdns_server --daemon=no --guardian=no --control-console --loglevel=9
116 if test "$NOTRUNNING" = "0"
128 echo Insufficient parameters
131 if test "$NOTRUNNING" = "0"
134 doPC show $2 ; echo $ret
143 echo Insufficient parameters
146 if test "$NOTRUNNING" = "0"
148 doPC show $2 ; echo $ret
151 doPC show $3 ; echo $ret
155 doPC uptime ; echo $ret
166 echo Insufficient parameters
169 if test "$NOTRUNNING" = "0"
171 doPC show $2 ; echo $ret
181 echo pdns [start\|stop\|force-reload\|restart\|status\|dump\|show\|mrtg\|cricket\|monitor]