comparison dnsbl.rc @ 41:d95af8129dfa

updates for 3.2, changing file layout, add queueid to messages
author carl
date Mon, 05 Jul 2004 10:52:02 -0700
parents 2ae8d953f1d0
children afcf403709ef
comparison
equal deleted inserted replaced
40:dc3d8d1aa2d2 41:d95af8129dfa
15 . /etc/sysconfig/network 15 . /etc/sysconfig/network
16 16
17 RETVAL=0 17 RETVAL=0
18 # See how we were called. 18 # See how we were called.
19 case "$1" in 19 case "$1" in
20 start) 20 start)
21 # Start daemons. 21 # Start daemons.
22 echo -n "Starting dnsbl-milter: " 22 echo -n "Starting dnsbl-milter: "
23 cd /var/dnsbl # conf file is here 23 if [ ! -f /var/lock/subsys/dnsbl ]; then
24 ./dnsbl -d -p local:/var/run/dnsbl.sock 24 cd /etc/dnsbl # conf file is here
25 RETVAL=$? 25 su -l dnsbl -s /bin/sh -c "/usr/sbin/dnsbl -d -p local:/var/run/dnsbl/dnsbl.sock "
26 sleep 3 26 RETVAL=$?
27 echo 27 pid=`pidof -s /usr/sbin/dnsbl`
28 [ $RETVAL -eq 0 ] && touch /var/lock/subsys/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
29 ;; 43 ;;
30 stop) 44 stop)
31 # Stop daemons. 45 # Stop daemons.
32 echo -n "Shutting down dnsbl-milter: " 46 echo -n "Shutting down dnsbl-milter: "
33 killproc dnsbl 47 killproc dnsbl
34 RETVAL=$? 48 RETVAL=$?
35 echo 49 echo
36 [ $RETVAL -eq 0 ] && rm -f /var/lock/subsys/dnsbl 50 [ $RETVAL -eq 0 ] && rm -f /var/lock/subsys/dnsbl
37 ;; 51 ;;
38 restart|reload) 52 restart|reload)
39 $0 stop 53 $0 stop
40 $0 start 54 $0 start
41 RETVAL=$? 55 RETVAL=$?
42 ;; 56 ;;
43 status) 57 status)
44 status dnsbl 58 status dnsbl
45 RETVAL=$? 59 RETVAL=$?
46 ;; 60 ;;
47 *) 61 *)
48 echo "Usage: dnsbl {start|stop|restart|status}" 62 echo "Usage: dnsbl {start|stop|restart|status}"
49 exit 1 63 exit 1
50 esac 64 esac
51 exit $RETVAL 65 exit $RETVAL
66
67 # $Id$