The rc.d script that comes with amavisd-new was unable to stop the
server for me.  Is seems pkill/pgrep does not recognize the pexp
expression, so the check sub tells it it isn't running and the stop sub
isn't run.  I was able to make it work with the following:

#!/bin/sh

daemon="/usr/local/sbin/amavisd"
pid="/var/amavisd/amavisd.pid"

. /etc/rc.d/rc.subr

#pexp="perl: amavisd"

rc_check() {
        /bin/ps -p `cat ${pid}` | /usr/bin/grep `cat ${pid}`
}

rc_stop() {
        ${daemon} stop
}

rc_reload() {
        ${daemon} reload
}

rc_cmd $1


If this seems like a good idea, or close to it, I will submit as a
patch.  Comments?

--TimH

Reply via email to