ASSP the best free Open Source Anti-Spam SMTP Proxy - Page 10 1.4.3.0 Startup script
Last Updated on Friday, 06 August 2010 14:29 Written by Joe Aldeguer Monday, 19 January 2009 23:01
Page 10 of 11
Script copied off ASSP forum.
(I modified the startup script by placing & at the end of $base to have assp run in background otherwise
it will cause Linux to hangup during startup.)
| #!/bin/sh # # assp This shell script takes care of starting and stopping # the Anti-Spam SMTP Proxy daemon. # # chkconfig: 235 99 10 # description: The Anti-Spam SMTP Proxy (ASSP) implements whitelists, \ # Bayesian, and basic anti-virus filtering to rid the \ # planet of the blight of unsolicited email (UCE). # ### BEGIN INIT INFO # Provides: ASSP # Required-Start: $network $syslog # Required-Stop: $network # Default-Start: 2 3 5 # Default-Stop: 0 1 6 # Short-Description: start and stop ASSP # Description: ASSP is the Anti-Spam SMTP Proxy ### END INIT INFO # Source function library. if [ -f /etc/init.d/functions ] ; then . /etc/init.d/functions elif [ -f /etc/rc.d/init.d/functions ] ; then . /etc/rc.d/init.d/functions else exit 1 fi # change base to location of your ASSP installation base=/usr/share/assp prog=$base/assp.pl lockfile=/var/lock/subsys/assp start() { echo -n $"Starting the Anti-Spam SMTP Proxy: " daemon $prog $base & RETVAL=$? echo [ $RETVAL -eq 0 ] && touch $lockfile || RETVAL=1 return $RETVAL } stop() { echo -n $"Stopping the Anti-Spam SMTP Proxy: " killproc $prog RETVAL=$? echo [ $RETVAL -eq 0 ] && rm -f $lockfile return $RETVAL } restart() { stop start } reload() { echo -n $"Reloading assp.cfg: " killproc $prog -HUP RETVAL=$? echo return $RETVAL } rhstatus() { status $prog return $? } case "$1" in start) start ;; stop) stop ;; status) rhstatus ;; restart) restart ;; reload) reload ;; *) echo $"Usage: $0 {start|stop|restart|reload|status}" RETVAL=2 esac exit $RETVAL |


