I have a pid file running with my SA.  It is a very minor hack to the
/etc/init.d/spamd file.  Look for the two lines that reference
/var/run/spamd.pid and add them to your spamd (or spamassassin) init
file.

case "$1" in
  start)
        # Start daemon.
        echo -n "Starting spamd: "
        daemon spamd $OPTIONS
        RETVAL=$?
        echo
        echo `pidof spamd` > /var/run/spamd.pid
        [ $RETVAL = 0 ] && touch /var/lock/subsys/spamd
        ;;
  stop)
        # Stop daemons.
        echo -n "Shutting down spamd: "
        killproc spamd
        RETVAL=$?
        echo
        rm -f /var/run/spamd.pid 2&>/dev/nul
        [ $RETVAL = 0 ] && rm -f /var/lock/subsys/spamd
        ;;

-Michael

>>> <[EMAIL PROTECTED]> 07/17/03 08:57AM >>>

Sorry if this has already been broached, but this seems like it would
be a
great idea and not too difficult to implement (but I could be way
off):

1) Have spamd re-read local.cf when it receives a HUP signal, rather
   that having to be stopped and restarted

2) Whether the #1 is doable or not, writing the PID of the parent
spamd
   process to a file ( var/run/spamd.pid ?).  Either way, it makes
   writing scripts for the local.cf alot easier.

James Smallacombe                     PlantageNet, Inc. CEO and Janitor
[EMAIL PROTECTED]                                                          
http://3.am 
=========================================================================



-------------------------------------------------------
This SF.net email is sponsored by: VM Ware
With VMware you can run multiple operating systems on a single
machine.
WITHOUT REBOOTING! Mix Linux / Windows / Novell virtual machines at
the
same time. Free trial click here: http://www.vmware.com/wl/offer/345/0

_______________________________________________
Spamassassin-talk mailing list
[EMAIL PROTECTED] 
https://lists.sourceforge.net/lists/listinfo/spamassassin-talk


-------------------------------------------------------
This SF.net email is sponsored by: VM Ware
With VMware you can run multiple operating systems on a single machine.
WITHOUT REBOOTING! Mix Linux / Windows / Novell virtual machines at the
same time. Free trial click here: http://www.vmware.com/wl/offer/345/0
_______________________________________________
Spamassassin-talk mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/spamassassin-talk

Reply via email to