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
19 # Source configureation.
20 if [ -f /etc/sysconfig/spamassassin ] ; then
21 . /etc/sysconfig/spamassassin
24 # Check that networking is up.
25 if is_no "${NETWORKING}"; then
26 msg_network_down SpamAssassin
30 # See how we were called.
34 if [ ! -f /var/lock/subsys/spamd ]; then
35 msg_starting SpamAssassin
36 daemon spamd $SPAMD_OPTS
38 [ $RETVAL -eq 0 ] && touch /var/lock/subsys/spamd
40 msg_already_running SpamAssassin
45 if [ -f /var/lock/subsys/spamd ]; then
46 msg_stopping SpamAssassin
49 rm -f /var/lock/subsys/spamd
51 msg_not_running SpamAssassin
62 msg_usage "$0 {start|stop|restart|status}"