3 # rspamd This script starts and stops the rspamd daemon
5 # chkconfig: 2345 80 30
7 # description: rspamd is a daemon process which uses rspamd to check \
8 # email messages for SPAM. It is normally called by rspamc \
11 # pidfile: /var/run/rspamd.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/rspamd ] ; then
22 . /etc/sysconfig/rspamd
25 # Check that networking is up.
26 if is_no "${NETWORKING}"; then
27 msg_network_down "rspamd"
33 if [ -f /var/lock/subsys/rspamd ]; then
34 msg_already_running "rspamd"
39 daemon /usr/bin/rspamd -u rspamd -g rspamd $RSPAMD_OPTS
41 [ $RETVAL -eq 0 ] && touch /var/lock/subsys/rspamd
46 if [ ! -f /var/lock/subsys/rspamd ]; then
47 msg_not_running "rspamd"
54 rm -f /var/lock/subsys/rspamd
58 if [ ! -f /var/lock/subsys/rspamd ]; then
59 msg_not_running "rspamd"
68 # See how we were called.
90 msg_usage "$0 {start|stop|restart|try-restart|force-reload|status}"