On Tue, Feb 26, 2002 at 09:16:27PM -0600, Mike Loiterman wrote: | FIXED! It works great if I remove the /dev/null and since there is no | output from it, I guess I'll just run it like this: | | [ -x /usr/local/sbin/spamd ] && /usr/local/sbin/spamd -dac && echo -n ' | spamd' | | My only question now is how to get it to stop via the init script. I | was using this: | kill `ps uax | grep xterm | grep -v grep | awk '{print $2}'` | | but that seems to only work sporadically...for some unknown reason. | | Appreciate the help!
I don't know anything about the *BSD init system, but for Debian, Duncan has provided this init script (it works too): ~~~~~~~~~~~~~~ #! /bin/sh # Spamd init script # November 2001 # Duncan Findlay # Based on skeleton by Miquel van Smoorenburg and Ian Murdock # Please do not name this script /etc/init.d/spamd. It may cause problems. # If start-stop-daemon complains about needing one of --exec, --pidfile or # --user, upgrade dpkg. PATH=/sbin:/bin:/usr/sbin:/usr/bin DAEMON=/usr/bin/spamd PNAME=spamd NAME=spamd SNAME=spamassassin DESC="SpamAssassin Mail Filter Daemon" # Note: these are overridden by /etc/default/spamassassin ENABLED=0 OPTIONS="" test -f /etc/default/spamassassin && . /etc/default/spamassassin test "$ENABLED" != "0" || exit 0 test -f $DAEMON || exit 0 set -e case "$1" in start) echo -n "Starting $DESC: " start-stop-daemon --start --quiet --name $PNAME \ --oknodo --startas $DAEMON -- -d $OPTIONS echo "$NAME." ;; stop) echo -n "Stopping $DESC: " start-stop-daemon --stop --quiet --oknodo --name $PNAME echo "$NAME." ;; restart|force-reload) echo -n "Restarting $DESC: " start-stop-daemon --stop --quiet --name $PNAME --oknodo sleep 1 start-stop-daemon --start --quiet --name $PNAME \ --oknodo --startas $DAEMON -- -d $OPTIONS echo "$NAME." ;; *) N=/etc/init.d/$SNAME echo "Usage: $N {start|stop|restart|force-reload}" >&2 exit 1 ;; esac exit 0 ~~~~~~~~~~~~~~ The crucial aspect of this is the 'start-stop-daemon' utility. On my system it is located in /sbin and is part of the 'dpkg' package and the manpage says it was written by Marek Michalkiewicz and Ian Jackson. This may not help you at all, but if you check out the source for start-stop-daemon you may get a hint. HTH, -D -- The righteous hate what is false, but the wicked bring shame and disgrace. Proverbs 13:5 _______________________________________________ Spamassassin-talk mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/spamassassin-talk