0
|
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 cd /var/dnsbl # conf file is here
|
16
|
24 ./dnsbl -d -p local:/var/run/dnsbl.sock
|
0
|
25 RETVAL=$?
|
|
26 sleep 3
|
|
27 echo
|
|
28 [ $RETVAL -eq 0 ] && touch /var/lock/subsys/dnsbl
|
|
29 ;;
|
|
30 stop)
|
|
31 # Stop daemons.
|
|
32 echo -n "Shutting down dnsbl-milter: "
|
|
33 killproc dnsbl
|
|
34 RETVAL=$?
|
|
35 echo
|
|
36 [ $RETVAL -eq 0 ] && rm -f /var/lock/subsys/dnsbl
|
|
37 ;;
|
|
38 restart|reload)
|
|
39 $0 stop
|
|
40 $0 start
|
|
41 RETVAL=$?
|
|
42 ;;
|
|
43 status)
|
|
44 status dnsbl
|
|
45 RETVAL=$?
|
|
46 ;;
|
|
47 *)
|
|
48 echo "Usage: dnsbl {start|stop|restart|status}"
|
|
49 exit 1
|
|
50 esac
|
|
51 exit $RETVAL
|