summaryrefslogtreecommitdiff
path: root/extra/spamassassin/spamd
diff options
context:
space:
mode:
Diffstat (limited to 'extra/spamassassin/spamd')
-rw-r--r--extra/spamassassin/spamd10
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