annotate dnsbl.rc @ 16:2ae8d953f1d0

add scanning for bare hostnames
author carl
date Thu, 29 Apr 2004 21:56:22 -0700
parents 96a9758165cd
children d95af8129dfa
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
0
96a9758165cd Initial revision
carl
parents:
diff changeset
1 #!/bin/sh
96a9758165cd Initial revision
carl
parents:
diff changeset
2 #
96a9758165cd Initial revision
carl
parents:
diff changeset
3 # dnsbl This script controls the dnsbl milter daemon.
96a9758165cd Initial revision
carl
parents:
diff changeset
4 #
96a9758165cd Initial revision
carl
parents:
diff changeset
5 #
96a9758165cd Initial revision
carl
parents:
diff changeset
6 # chkconfig: 2345 79 31
96a9758165cd Initial revision
carl
parents:
diff changeset
7 # description: dnsbl is an interface between MTA and the various dns blocking lists
96a9758165cd Initial revision
carl
parents:
diff changeset
8 # processname: dnsbl
96a9758165cd Initial revision
carl
parents:
diff changeset
9 # pidfile: /var/run/dnsbl.pid
96a9758165cd Initial revision
carl
parents:
diff changeset
10 # Source function library.
96a9758165cd Initial revision
carl
parents:
diff changeset
11 #
96a9758165cd Initial revision
carl
parents:
diff changeset
12 . /etc/rc.d/init.d/functions
96a9758165cd Initial revision
carl
parents:
diff changeset
13
96a9758165cd Initial revision
carl
parents:
diff changeset
14 # Source networking configuration.
96a9758165cd Initial revision
carl
parents:
diff changeset
15 . /etc/sysconfig/network
96a9758165cd Initial revision
carl
parents:
diff changeset
16
96a9758165cd Initial revision
carl
parents:
diff changeset
17 RETVAL=0
96a9758165cd Initial revision
carl
parents:
diff changeset
18 # See how we were called.
96a9758165cd Initial revision
carl
parents:
diff changeset
19 case "$1" in
96a9758165cd Initial revision
carl
parents:
diff changeset
20 start)
96a9758165cd Initial revision
carl
parents:
diff changeset
21 # Start daemons.
96a9758165cd Initial revision
carl
parents:
diff changeset
22 echo -n "Starting dnsbl-milter: "
96a9758165cd Initial revision
carl
parents:
diff changeset
23 cd /var/dnsbl # conf file is here
16
2ae8d953f1d0 add scanning for bare hostnames
carl
parents: 0
diff changeset
24 ./dnsbl -d -p local:/var/run/dnsbl.sock
0
96a9758165cd Initial revision
carl
parents:
diff changeset
25 RETVAL=$?
96a9758165cd Initial revision
carl
parents:
diff changeset
26 sleep 3
96a9758165cd Initial revision
carl
parents:
diff changeset
27 echo
96a9758165cd Initial revision
carl
parents:
diff changeset
28 [ $RETVAL -eq 0 ] && touch /var/lock/subsys/dnsbl
96a9758165cd Initial revision
carl
parents:
diff changeset
29 ;;
96a9758165cd Initial revision
carl
parents:
diff changeset
30 stop)
96a9758165cd Initial revision
carl
parents:
diff changeset
31 # Stop daemons.
96a9758165cd Initial revision
carl
parents:
diff changeset
32 echo -n "Shutting down dnsbl-milter: "
96a9758165cd Initial revision
carl
parents:
diff changeset
33 killproc dnsbl
96a9758165cd Initial revision
carl
parents:
diff changeset
34 RETVAL=$?
96a9758165cd Initial revision
carl
parents:
diff changeset
35 echo
96a9758165cd Initial revision
carl
parents:
diff changeset
36 [ $RETVAL -eq 0 ] && rm -f /var/lock/subsys/dnsbl
96a9758165cd Initial revision
carl
parents:
diff changeset
37 ;;
96a9758165cd Initial revision
carl
parents:
diff changeset
38 restart|reload)
96a9758165cd Initial revision
carl
parents:
diff changeset
39 $0 stop
96a9758165cd Initial revision
carl
parents:
diff changeset
40 $0 start
96a9758165cd Initial revision
carl
parents:
diff changeset
41 RETVAL=$?
96a9758165cd Initial revision
carl
parents:
diff changeset
42 ;;
96a9758165cd Initial revision
carl
parents:
diff changeset
43 status)
96a9758165cd Initial revision
carl
parents:
diff changeset
44 status dnsbl
96a9758165cd Initial revision
carl
parents:
diff changeset
45 RETVAL=$?
96a9758165cd Initial revision
carl
parents:
diff changeset
46 ;;
96a9758165cd Initial revision
carl
parents:
diff changeset
47 *)
96a9758165cd Initial revision
carl
parents:
diff changeset
48 echo "Usage: dnsbl {start|stop|restart|status}"
96a9758165cd Initial revision
carl
parents:
diff changeset
49 exit 1
96a9758165cd Initial revision
carl
parents:
diff changeset
50 esac
96a9758165cd Initial revision
carl
parents:
diff changeset
51 exit $RETVAL