You are not logged in.

#1 2011-07-03 14:06:06

mezcal
Member
From: Czech Republic
Registered: 2006-01-31
Posts: 67
Website

Spamassassin stopping problem

Hello,

I`m trying to stop or restart spamassassin.

/etc/rc.d/spamd start

works fine, but

/etc/rc.d/spamd stop

fails.

I have found out that problem is

pidof -o %PPID /usr/bin/vendor_perl/spamd

returns nothing.

Has anybody the same problem?
Any ideas how to fix it.

thx
Filip

Offline

#2 2011-07-13 07:02:32

pantaril
Member
Registered: 2009-06-03
Posts: 7

Re: Spamassassin stopping problem

Hi, i have exactly the same problem.

solved it by workaround, i edited /etc/rc.d/spamd, replaced the line

PID=`pidof -o %PPID /usr/bin/vendor_perl/spamd`

with

if [ -f "/var/run/spamd.pid" ]
then
    PID=`cat /var/run/spamd.pid`
fi

But i wonder why pidof -o %PPID /usr/bin/vendor_perl/spamd doesn't work. The process is running and is  listed in ps:

[root@malco ~]# ps aux | grep spamd
root      4228  0.1  1.3 105928 48492 ?        Ss   08:35   0:01 /usr/bin/vendor_perl/spamd -d -c --max-children 1 --username spamd -H /var/lib/spamassassin/ -s /var/log/spamd.log --pidfile /var/run/spamd.pid
spamd     4230  0.0  1.3 105928 47072 ?        S    08:35   0:00 spamd child
root      4714  0.0  0.0   8356   948 pts/4    S+   09:00   0:00 grep spamd

I'd appreciate an explenation of pidof behaviour.

Offline

#3 2011-07-13 07:26:22

pantaril
Member
Registered: 2009-06-03
Posts: 7

Re: Spamassassin stopping problem

Also, there is bugreport open for this issue: https://bugs.archlinux.org/task/25043

Offline

#4 2011-07-13 11:48:26

mezcal
Member
From: Czech Republic
Registered: 2006-01-31
Posts: 67
Website

Re: Spamassassin stopping problem

Also, is interesting that pidof spamd with options returns pid.
In my case:

pidof '/usr/bin/vendor_perl/spamd -d -c'

Offline

#5 2011-12-28 09:32:41

ViErMaAlJ
Member
From: Belgium
Registered: 2011-12-28
Posts: 2

Re: Spamassassin stopping problem

What worked for me was replacing:

PID=`pidof -o %PPID /usr/bin/vendor_perl/spamd`

with this:

PID=`pidof -o %PPID "/usr/bin/vendor_perl/spamd -d ${SPAMD_OPTS}"`

in "/etc/rc.d/spamd"

my "ps aux | grep spamd" output was:

root      3093 20.2  1.1 104844 47236 ?        Ss   10:18   0:01 /usr/bin/vendor_perl/spamd -d -c -L --max-children=2
root      3094  0.0  1.1 104844 45644 ?        S    10:18   0:00 spamd child
root      3095  0.0  1.1 104844 45644 ?        S    10:18   0:00 spamd child
root      3097  0.0  0.0   8532  1052 pts/1    S+   10:19   0:00 grep --color=auto spamd

So I think "pidof" needs the full name to search...

Offline

Board footer

Powered by FluxBB