comparison dnsbl.rc @ 166:7161d8451fcf

fix unitialized variable
author carl
date Sun, 26 Aug 2007 20:54:59 -0700
parents
children
comparison
equal deleted inserted replaced
165:bf828f785407 166:7161d8451fcf
1 #!/bin/sh
2 #
3 # dnsbl This script controls the dnsbl milter daemon.
4 #
5 #
6 # chkconfig: 2345 79 31
7 # description: dnsbl is an interface between MTA and the various dns blocking lists
8 # processname: dnsbl
9 # pidfile: /var/run/dnsbl.pid
10 # Source function library.
11 #
12 . /etc/rc.d/init.d/functions
13
14 # Source networking configuration.
15 . /etc/sysconfig/network
16
17 RETVAL=0
18 # See how we were called.
19 case "$1" in
20 start)
21 # Start daemons.
22 echo -n "Starting dnsbl-milter: "
23 if [ ! -f /var/lock/subsys/dnsbl ]; then
24 cd SYSCONFDIR/dnsbl # conf file is here
25 SBINDIR/dnsbl -d 10 -r /var/run/dnsbl/dnsbl.resolver.sock -p local:/var/run/dnsbl/dnsbl.sock
26 RETVAL=$?
27 pid=`pidof -s SBINDIR/dnsbl`
28 if [ $pid ]
29 then
30 success "Starting dnsbl milter:"
31 touch /var/lock/subsys/dnsbl
32 echo
33 else
34 failure "Starting dnsbl milter:"
35 echo
36 fi
37 else
38 echo -n "already running! "
39 failure "dnsbl milter already running!"
40 echo
41 fi
42
43 ;;
44 stop)
45 # Stop daemons.
46 echo -n "Shutting down dnsbl-milter: "
47 killproc dnsbl
48 RETVAL=$?
49 echo
50 [ $RETVAL -eq 0 ] && rm -f /var/lock/subsys/dnsbl
51 ;;
52 restart|reload)
53 $0 stop
54 $0 start
55 RETVAL=$?
56 ;;
57 status)
58 status dnsbl
59 RETVAL=$?
60 ;;
61 *)
62 echo "Usage: dnsbl {start|stop|restart|status}"
63 exit 1
64 esac
65 exit $RETVAL
66
67 # $Id$