Hi Adam,

Thinking aloud here...

Would "killall spamd" be a viable replacement on Linux for:

    PID=`ps -auwx | grep spamd | grep -v grep | awk '{print $2}'`
    kill -9 $PID




Regards,

Chuck


-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] Behalf Of Adam
Denenberg
Sent: Wednesday, June 04, 2003 3:07 PM
To: Chris Santerre
Cc: 'Marius Kirschner'; 'Duncan Findlay';
[EMAIL PROTECTED]
Subject: RE: [SAtalk] Restarting sa


i use this

#!/bin/sh

PATH=/var/qmail/bin:/bin:/usr/bin:/usr/local/bin:/usr/local/sbin
export PATH

case "$1" in

  start)
    echo "Starting Spamassassin"
    /usr/bin/spamd -a -d -L -x 
    ;;

  stop)
    echo "Stopping Spamassassin..."
    PID=`ps -auwx | grep spamd | grep -v grep | awk '{print $2}'`
    echo "Killing PID $PID"
    kill -9 $PID
    ;;

  restart)
    $0 stop
    $0 start
    ;;

esac

exit 0

this is on linux, os if you are on solaris, just replace ps -auwx with
ps -ef 

 adam


On Wed, 2003-06-04 at 14:59, Chris Santerre wrote:
> try this
> 
> ps -ef | grep spamd
> 
> note process id#
> 
> then kill -TERM id#
> 
> then start spamd again (/usr/bin/spamd -d -c -a) or something like that. 
> 
> > -----Original Message-----
> > From: Marius Kirschner [mailto:[EMAIL PROTECTED]
> > Sent: Wednesday, June 04, 2003 2:29 PM
> > To: 'Duncan Findlay'; [EMAIL PROTECTED]
> > Subject: RE: [SAtalk] Restarting sa
> > 
> > 
> > Well, if I try to stop spamd I get the following error message:
> > 
> > Could not create INET socket: Address already in use IO::Socket::INET:
> > Address already in use
> > 
> > Basically, I want it to re-read the local.cf file.
> > 
> > ---Marius
> > 
> > > -----Original Message-----
> > > From: [EMAIL PROTECTED] 
> > > [mailto:[EMAIL PROTECTED] On 
> > > Behalf Of Duncan Findlay
> > > Sent: Tuesday, June 03, 2003 10:24 PM
> > > To: [EMAIL PROTECTED]
> > > Subject: Re: [SAtalk] Restarting sa
> > > 
> > > 
> > > On Tue, Jun 03, 2003 at 10:02:25PM -0400, Marius Kirschner wrote:
> > > > What's the proper command to restart spamassassin?  Sorry for the 
> > > > newbie question but I've been all over the documentation, list 
> > > > archives, and FAQs and couldn't find it.  Apparently I 
> > didn't look 
> > > > good enough as I'm sure it must be somewhere, but hey....I really 
> > > > tried. :)  Thanks,
> > > 
> > > spamassassin (i.e. /usr/bin/spamassassin) doesn't need to be 
> > > restarted... it's called once per message.
> > > 
> > > I think you mean spamd. That depends somewhat on your 
> > > installation. If you installed from a tarball or from CPAN, 
> > > chances are you can just kill it and start it again.
> > > 
> > > If you installed the Debian package, /etc/init.d/spamassassin 
> > > restart should do the trick.
> > > 
> > > -- 
> > > Duncan Findlay
> > > 
> > 
> > 
> > 
> > -------------------------------------------------------
> > This SF.net email is sponsored by:  Etnus, makers of 
> > TotalView, The best
> > thread debugger on the planet. Designed with thread debugging features
> > you've never dreamed of, try TotalView 6 free at www.etnus.com.
> > _______________________________________________
> > Spamassassin-talk mailing list
> > [EMAIL PROTECTED]
> > https://lists.sourceforge.net/lists/listinfo/spamassassin-talk
> > 
> 
> 
> -------------------------------------------------------
> This SF.net email is sponsored by:  Etnus, makers of TotalView, The best
> thread debugger on the planet. Designed with thread debugging features
> you've never dreamed of, try TotalView 6 free at www.etnus.com.
> _______________________________________________
> Spamassassin-talk mailing list
> [EMAIL PROTECTED]
> https://lists.sourceforge.net/lists/listinfo/spamassassin-talk



-------------------------------------------------------
This SF.net email is sponsored by:  Etnus, makers of TotalView, The best
thread debugger on the planet. Designed with thread debugging features
you've never dreamed of, try TotalView 6 free at www.etnus.com.
_______________________________________________
Spamassassin-talk mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/spamassassin-talk



-------------------------------------------------------
This SF.net email is sponsored by:  Etnus, makers of TotalView, The best
thread debugger on the planet. Designed with thread debugging features
you've never dreamed of, try TotalView 6 free at www.etnus.com.
_______________________________________________
Spamassassin-talk mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/spamassassin-talk

Reply via email to