diff options
author | root <root@rshg054.dnsready.net> | 2012-01-17 23:14:55 +0000 |
---|---|---|
committer | root <root@rshg054.dnsready.net> | 2012-01-17 23:14:55 +0000 |
commit | 7de0a9c21ecdb7becae761d7c9f2e723cb9ae0d3 (patch) | |
tree | cf569d409766ee004e997226104d64aa76bcd28f /extra/spamassassin/spamd | |
parent | 08a16f35d70b750b4db213a4bfcbacf5b3be4d74 (diff) |
Tue Jan 17 23:14:54 UTC 2012
Diffstat (limited to 'extra/spamassassin/spamd')
-rw-r--r-- | extra/spamassassin/spamd | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/extra/spamassassin/spamd b/extra/spamassassin/spamd index 11d35f7cd..3fb97566e 100644 --- a/extra/spamassassin/spamd +++ b/extra/spamassassin/spamd @@ -6,11 +6,17 @@ . /etc/rc.conf . /etc/rc.d/functions -PID=`pidof -o %PPID /usr/bin/vendor_perl/spamd` +PIDFILE=/var/run/spamd.pid +if [ -f $PIDFILE ]; then + PID=$(cat $PIDFILE) +else + PID=$(pidof -o %PPID /usr/bin/vendor_perl/spamd) #backward compat +fi + case "$1" in start) stat_busy "Starting spamd" - [ -z "$PID" ] && /usr/bin/vendor_perl/spamd -d ${SPAMD_OPTS} + [ -z "$PID" ] && /usr/bin/vendor_perl/spamd -d -r "$PIDFILE" ${SPAMD_OPTS} if [ $? -gt 0 ]; then stat_fail else |