diff dnsbl.rc.in @ 163:97d7da45fe2a

spamassassin changes
author carl
date Sun, 26 Aug 2007 19:03:17 -0700
parents
children d6531c702be3
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/dnsbl.rc.in	Sun Aug 26 19:03:17 2007 -0700
@@ -0,0 +1,67 @@
+#!@BASH@
+#
+# dnsbl   This script controls the dnsbl milter daemon.
+#
+#
+# chkconfig: 2345 79 31
+# description: dnsbl is an interface between MTA and the various dns blocking lists
+# processname: dnsbl
+# pidfile: /var/run/dnsbl.pid
+# Source function library.
+#
+. /etc/rc.d/init.d/functions
+
+# Source networking configuration.
+. /etc/sysconfig/network
+
+RETVAL=0
+# See how we were called.
+case "$1" in
+    start)
+        # Start daemons.
+        echo -n "Starting dnsbl-milter: "
+        if [ ! -f /var/lock/subsys/dnsbl ]; then
+            cd SYSCONFDIR/dnsbl     # conf file is here
+            SBINDIR/dnsbl -d 10 -r /var/run/dnsbl/dnsbl.resolver.sock -p local:/var/run/dnsbl/dnsbl.sock
+            RETVAL=$?
+            pid=`pidof -s SBINDIR/dnsbl`
+            if [ $pid ]
+            then
+                success "Starting dnsbl milter:"
+                touch /var/lock/subsys/dnsbl
+                echo
+            else
+                failure "Starting dnsbl milter:"
+                echo
+            fi
+        else
+            echo -n "already running! "
+            failure "dnsbl milter already running!"
+            echo
+        fi
+
+        ;;
+    stop)
+        # Stop daemons.
+        echo -n "Shutting down dnsbl-milter: "
+        killproc dnsbl
+        RETVAL=$?
+        echo
+        [ $RETVAL -eq 0 ] && rm -f /var/lock/subsys/dnsbl
+        ;;
+    restart|reload)
+        $0 stop
+        $0 start
+        RETVAL=$?
+        ;;
+    status)
+        status dnsbl
+        RETVAL=$?
+        ;;
+    *)
+        echo "Usage: dnsbl {start|stop|restart|status}"
+        exit 1
+esac
+exit $RETVAL
+
+# $Id$