annotate dnsbl.rc @ 67:a39c813e8f7b

add uuencode decoding
author carl
date Sat, 22 Jan 2005 18:07:09 -0800
parents 390ed250c5d2
children c1280cd3e248
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
41
d95af8129dfa updates for 3.2, changing file layout, add queueid to messages
carl
parents: 16
diff changeset
20 start)
0
96a9758165cd Initial revision
carl
parents:
diff changeset
21 # Start daemons.
96a9758165cd Initial revision
carl
parents:
diff changeset
22 echo -n "Starting dnsbl-milter: "
41
d95af8129dfa updates for 3.2, changing file layout, add queueid to messages
carl
parents: 16
diff changeset
23 if [ ! -f /var/lock/subsys/dnsbl ]; then
d95af8129dfa updates for 3.2, changing file layout, add queueid to messages
carl
parents: 16
diff changeset
24 cd /etc/dnsbl # conf file is here
60
390ed250c5d2 use local unix domain socket for resolver process communication
carl
parents: 59
diff changeset
25 /usr/sbin/dnsbl -d -r /var/run/dnsbl/dnsbl.resolver.sock -p local:/var/run/dnsbl/dnsbl.sock
41
d95af8129dfa updates for 3.2, changing file layout, add queueid to messages
carl
parents: 16
diff changeset
26 RETVAL=$?
d95af8129dfa updates for 3.2, changing file layout, add queueid to messages
carl
parents: 16
diff changeset
27 pid=`pidof -s /usr/sbin/dnsbl`
d95af8129dfa updates for 3.2, changing file layout, add queueid to messages
carl
parents: 16
diff changeset
28 if [ $pid ]
d95af8129dfa updates for 3.2, changing file layout, add queueid to messages
carl
parents: 16
diff changeset
29 then
d95af8129dfa updates for 3.2, changing file layout, add queueid to messages
carl
parents: 16
diff changeset
30 success "Starting dnsbl milter:"
d95af8129dfa updates for 3.2, changing file layout, add queueid to messages
carl
parents: 16
diff changeset
31 touch /var/lock/subsys/dnsbl
d95af8129dfa updates for 3.2, changing file layout, add queueid to messages
carl
parents: 16
diff changeset
32 echo
d95af8129dfa updates for 3.2, changing file layout, add queueid to messages
carl
parents: 16
diff changeset
33 else
d95af8129dfa updates for 3.2, changing file layout, add queueid to messages
carl
parents: 16
diff changeset
34 failure "Starting dnsbl milter:"
d95af8129dfa updates for 3.2, changing file layout, add queueid to messages
carl
parents: 16
diff changeset
35 echo
d95af8129dfa updates for 3.2, changing file layout, add queueid to messages
carl
parents: 16
diff changeset
36 fi
d95af8129dfa updates for 3.2, changing file layout, add queueid to messages
carl
parents: 16
diff changeset
37 else
d95af8129dfa updates for 3.2, changing file layout, add queueid to messages
carl
parents: 16
diff changeset
38 echo -n "already running! "
d95af8129dfa updates for 3.2, changing file layout, add queueid to messages
carl
parents: 16
diff changeset
39 failure "dnsbl milter already running!"
d95af8129dfa updates for 3.2, changing file layout, add queueid to messages
carl
parents: 16
diff changeset
40 echo
d95af8129dfa updates for 3.2, changing file layout, add queueid to messages
carl
parents: 16
diff changeset
41 fi
d95af8129dfa updates for 3.2, changing file layout, add queueid to messages
carl
parents: 16
diff changeset
42
0
96a9758165cd Initial revision
carl
parents:
diff changeset
43 ;;
41
d95af8129dfa updates for 3.2, changing file layout, add queueid to messages
carl
parents: 16
diff changeset
44 stop)
0
96a9758165cd Initial revision
carl
parents:
diff changeset
45 # Stop daemons.
96a9758165cd Initial revision
carl
parents:
diff changeset
46 echo -n "Shutting down dnsbl-milter: "
96a9758165cd Initial revision
carl
parents:
diff changeset
47 killproc dnsbl
96a9758165cd Initial revision
carl
parents:
diff changeset
48 RETVAL=$?
96a9758165cd Initial revision
carl
parents:
diff changeset
49 echo
96a9758165cd Initial revision
carl
parents:
diff changeset
50 [ $RETVAL -eq 0 ] && rm -f /var/lock/subsys/dnsbl
96a9758165cd Initial revision
carl
parents:
diff changeset
51 ;;
41
d95af8129dfa updates for 3.2, changing file layout, add queueid to messages
carl
parents: 16
diff changeset
52 restart|reload)
0
96a9758165cd Initial revision
carl
parents:
diff changeset
53 $0 stop
96a9758165cd Initial revision
carl
parents:
diff changeset
54 $0 start
96a9758165cd Initial revision
carl
parents:
diff changeset
55 RETVAL=$?
96a9758165cd Initial revision
carl
parents:
diff changeset
56 ;;
41
d95af8129dfa updates for 3.2, changing file layout, add queueid to messages
carl
parents: 16
diff changeset
57 status)
0
96a9758165cd Initial revision
carl
parents:
diff changeset
58 status dnsbl
96a9758165cd Initial revision
carl
parents:
diff changeset
59 RETVAL=$?
96a9758165cd Initial revision
carl
parents:
diff changeset
60 ;;
41
d95af8129dfa updates for 3.2, changing file layout, add queueid to messages
carl
parents: 16
diff changeset
61 *)
0
96a9758165cd Initial revision
carl
parents:
diff changeset
62 echo "Usage: dnsbl {start|stop|restart|status}"
96a9758165cd Initial revision
carl
parents:
diff changeset
63 exit 1
96a9758165cd Initial revision
carl
parents:
diff changeset
64 esac
96a9758165cd Initial revision
carl
parents:
diff changeset
65 exit $RETVAL
41
d95af8129dfa updates for 3.2, changing file layout, add queueid to messages
carl
parents: 16
diff changeset
66
d95af8129dfa updates for 3.2, changing file layout, add queueid to messages
carl
parents: 16
diff changeset
67 # $Id$