3 # pdns Proxy DNS Daemon
7 # description: Proxy DNS Daemon
10 # Source function library
11 . /etc/rc.d/init.d/functions
14 . /etc/sysconfig/network
21 # Get service config - may override defaults
22 [ -f /etc/sysconfig/pdnsd ] && . /etc/sysconfig/pdnsd
24 # Check that networking is up.
25 if is_yes "${NETWORKING}"; then
26 if [ ! -f /var/lock/subsys/network -a "$1" != stop -a "$1" != status ]; then
27 msg_network_down Pdnsd
34 test -x /usr/sbin/pdnsd || exit 0
39 # Check if the service is already running?
40 if [ ! -f /var/lock/subsys/pdns ]; then
42 daemon pdnsd --daemon -p /var/run/pdnsd.pid $STATUS $DEBUG $VERBOSE
44 [ $RETVAL -eq 0 ] && touch /var/lock/subsys/pdns
46 msg_already_running Pdns
50 if [ -f /var/lock/subsys/pdns ]; then
54 rm -f /var/lock/subsys/pdns >/dev/null 2>&1
65 if [ -f /var/lock/subsys/pdns ]; then
70 msg_not_running Pdns >&2
79 msg_usage "$0 {start|stop|restart|reload|force-reload|status}"