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
33 if [ ! -f /var/lock/subsys/spamd ]; then
34 msg_starting SpamAssassin
35 daemon spamd $SPAMD_OPTS
37 [ $RETVAL -eq 0 ] && touch /var/lock/subsys/spamd
39 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
55 # See how we were called.
71 msg_usage "$0 {start|stop|restart|status}"