3 # spamassassin This script starts and stops the spamd daemon
5 # chkconfig: 2345 80 30
7 # description: spamd is a daemon process which uses SpamAssassin to check \
8 # email messages for SPAM. It is normally called by spamc \
11 # pidfile: /var/run/spamassassin.pid
13 # Source function library.
14 . /etc/rc.d/init.d/functions
16 # Source networking configuration.
17 . /etc/sysconfig/network
20 # Source configureation.
21 if [ -f /etc/sysconfig/spamd ] ; then
22 . /etc/sysconfig/spamd
25 # Check that networking is up.
26 if is_no "${NETWORKING}"; then
27 msg_network_down SpamAssassin
31 # See how we were called.
35 if [ ! -f /var/lock/subsys/spamd ]; then
36 msg_starting SpamAssassin
37 daemon spamd $SPAMD_OPTS
39 [ $RETVAL -eq 0 ] && touch /var/lock/subsys/spamd
41 msg_already_running SpamAssassin
46 if [ -f /var/lock/subsys/spamd ]; then
47 msg_stopping SpamAssassin
50 rm -f /var/lock/subsys/spamd
52 msg_not_running SpamAssassin
63 msg_usage "$0 {start|stop|restart|status}"