Mercurial > dnsbl
comparison dnsbl.rc @ 0:96a9758165cd original
Initial revision
author | carl |
---|---|
date | Tue, 20 Apr 2004 20:02:29 -0700 |
parents | |
children | 2ae8d953f1d0 |
comparison
equal
deleted
inserted
replaced
-1:000000000000 | 0:96a9758165cd |
---|---|
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 | |
24 ./dnsbl -p local:/var/run/dnsbl.sock | |
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 |