]> git.pld-linux.org Git - packages/pdnsd.git/blob - pdnsd.init
- raw version from 1.0.3 tar ball.
[packages/pdnsd.git] / pdnsd.init
1 #!/bin/bash
2 #
3 # $Id$
4 #
5 #       /etc/rc.d/init.d/pdnsd
6 #
7 # Starts the Proxy DNS Daemon
8 #
9 # tested on Redhat 6.1 should work on 5.0+
10 # chkconfig: 345 87 14
11 # description: Proxy DNS Daemon
12 #
13
14 # Source function library.
15 . /etc/rc.d/init.d/functions
16
17 test -x /usr/sbin/pdnsd || exit 0
18
19 RETVAL=0
20
21 #
22 #       See how we were called.
23 #
24 case "$1" in
25   start)
26         echo -n 'Starting pdnsd: '
27         daemon /usr/sbin/pdnsd -d
28         RETVAL=$? 
29         [ $RETVAL -eq 0 ] && touch /var/lock/subsys/pdnsd
30         echo
31         ;;
32   stop)
33         echo -n 'Shutting down pdnsd: '
34         killproc pdnsd 
35         RETVAL=$? 
36         [ $RETVAL -eq 0 ] && rm -f /var/lock/subsys/pdnsd
37         echo
38         ;;
39   status)
40     status pdnsd
41         exit $?
42         ;;
43   reload|restart)
44         $0 stop
45         $0 start
46         RETVAL=$?
47         ;;
48   *)
49         echo "Usage: /etc/rc.d/init.d/pdnsd {start|stop|status|restart|reload}"
50         exit 1
51 esac
52
53 exit $RETVAL
This page took 0.071868 seconds and 4 git commands to generate.