3 # $Id: spamass-milter-redhat.rc,v 1.4 2003/03/06 21:33:51 dnelson Exp $
5 # spamass-milter This script starts and stops the spamass-milter daemon
7 # chkconfig: 2345 80 30
9 # description: spamass-milter is a daemon which hooks into sendmail and routes
10 # email messages to spamassassin
11 # processname: spamass-milter
14 # Source function library.
15 . /etc/rc.d/init.d/functions
17 # Source networking configuration.
18 . /etc/sysconfig/network
20 # Local spamass-milter config
21 SM_SOCKET=/var/run/spamass.sock
23 [ -f /etc/sysconfig/spamass-milter ] && . /etc/sysconfig/spamass-milter
25 # Check that networking is up.
26 [ ${NETWORKING} = "no" ] && exit 0
28 [ -x /usr/sbin/spamass-milter ] || exit 0
34 echo -n "Starting spamass-milter: "
35 daemon spamass-milter -p ${SM_SOCKET} -f ${SM_EXTRA_FLAGS}
38 test $RETVAL -eq 0 && touch /var/lock/subsys/spamass-milter
43 echo -n "Shutting down spamass-milter: "
44 killproc spamass-milter
47 test $RETVAL -eq 0 && rm -f /var/lock/subsys/spamass-milter
55 # See how we were called.
69 test -f /var/lock/subsys/spamass-milter && $0 restart || :
75 echo "Usage: $0 {start|stop|reload|restart|condrestart|status}"