Hello, I am trying to us sb_server.py as a daemon. I am using the script from Fernando Nino: ######################## #!/bin/bash # # spambayes: Starts the spam filter as a pop3 proxy # # Version: @(#) /etc/init.d/spambayes 1.0 # # chkconfig: - 95 21 # description: This shell script takes care of starting and stopping \ # spambayes pop3 proxy # processname: sb_server.py #
SBPROXY=/usr/bin/sb_server.py SBLOG=/var/log/spam.log SBDIR=/var/mail/vhosts/.spambayes/hammiedb [ -x $SBPROXY ] || exit 0 # Source function library. # Change by myself ##. /etc/init.d/functions . /lib/lsb/init-functions RETVAL=0 start () { date >> $SBLOG echo -n "Starting SpamBayes POP3 proxy: " if [ ! -d $SBDIR ] ; then echo "Repertoire $SBDIR non present" >> $SBLOG RETVAL=1 else cd $SBDIR ($SBPROXY 2>&1 >> $SBLOG) & RETVAL=$? fi action "" [ $RETVAL = 0 ] return $RETVAL } stop () { # stop daemon date >> $SBLOG echo -n "Stopping SpamBayes POP3 proxy: " killproc $SBPROXY 1 RETVAL=$? echo [ $RETVAL = 0 ] return $RETVAL } restart () { stop start RETVAL=$? return $RETVAL } # See how we were called. case "$1" in start) start ;; stop) stop ;; status) status $SBPROXY RETVAL=$? ;; restart) restart ;; *) echo "Usage: $0 {start|stop|restart|status}" RETVAL=1 esac ############################ and when I run it I got this error message: ./spambayes start Starting SpamBayes POP3 proxy: ./spambayes: line 36: action: command not found Any idea ? Bye _______________________________________________ SpamBayes@python.org http://mail.python.org/mailman/listinfo/spambayes Info/Unsubscribe: http://mail.python.org/mailman/listinfo/spambayes Check the FAQ before asking: http://spambayes.sf.net/faq.html