I get the following after creating the script, chmod +x ..
Starting SpamAssassin daemon: [16717] warn: Option r requires an argument
/etc/init.d/spamd: line 17: /var/run/spamd/spamd.pid: No such file or
directory
Bowie Bailey wrote:
From: Jeffrey Duncan [mailto:[EMAIL PROTECTED]
I installed using cpan Mail::SpamAssassin as listed on SA site. It's
working, but it won't start as a service.
neither service is listed in that directory.
I install the same way and I've got an /etc/rc.d/init.d/spamd file to
do the startup. It's possible I may have written it myself.
Try putting the file listed below into /etc/rc.d/init.d/spamd (or
spamassassin, whichever you prefer).
Bowie
----------------------------------------------------------------------------
----------------------------
#!/bin/bash
# chkconfig: 2345 30 70
# Description: Daemon for email spam checking
# Startup file for spamd
#
export LC_ALL=C
# source function library
. /etc/init.d/functions
RETVAL=0
start() {
echo -n $"Starting SpamAssassin daemon: "
/usr/bin/spamd -d -m 8 --max-conn-per-child=50 -r
/var/run/spamd/spamd.pid
echo
return 0
}
stop() {
echo -n $"Stopping SpamAssassin daemon: "
kill `cat /var/run/spamd/spamd.pid`
echo
return 0
}
reload(){
stop
start
}
restart(){
stop
start
}
case "$1" in
start)
start
;;
stop)
stop
;;
restart)
restart
;;
reload)
reload
;;
*)
echo $"Usage: $0 {start|stop|restart|reload}"
RETVAL=1
esac
exit $RETVAL