Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 31 Jul 2006 14:40:27 GMT
From:      Marshal Newrock <marshal@idealso.com>
To:        freebsd-ports-bugs@FreeBSD.org
Subject:   Re: ports/99794: mail/spampd: rc script for spampd
Message-ID:  <200607311440.k6VEeRje075982@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help
The following reply was made to PR ports/99794; it has been noted by GNATS.

From: Marshal Newrock <marshal@idealso.com>
To: bug-followup@freebsd.org
Cc:  
Subject: Re: ports/99794: mail/spampd: rc script for spampd
Date: Mon, 31 Jul 2006 10:33:43 -0400

 The original script does not work properly because spampd is a perl process, 
 and so "spampd" does not appear in the process list.  This version 
 addresses this.
 
 
 #!/bin/sh
 #
 # PROVIDE: spampd
 #
 # Add the fellowing line to /etc/rc.conf to enable spampd:
 #
 # spampd_enable (bool):         Set it to "YES" to enable spampd
 #                               Default is "NO"
 # spampd_flags
 
 . /etc/rc.subr
 
 name="spampd"
 rcvar=`set_rcvar`
 
 : ${spampd_enable="NO"}
 : ${spampd_pidfile="/var/run/spamd/spampd.pid"}
 : ${spampd_flags="--user=spamd --group=spamd --host 
 127.0.0.1:10024 --relayhost=
 127.0.0.1:10025 --dose --tagall --auto-whitelist"}
 
 load_rc_config $name
 
 command="/usr/local/sbin/$name"
 command_args="${spampd_flags} --pid=${spampd_pidfile}"
 pidfile="${spampd_pidfile}"
 sig_stop="-KILL"
 stop_cmd="stop_cmd"
 status_cmd="status_cmd"
 
 stop_cmd()
 {
   if [ -f "$pidfile" ]; then
     kill `cat $pidfile`
     rm -f $pidfile
     echo -n " spampd"
   fi
 }
 
 status_cmd()
 {
   if [ -f "$pidfile" ]; then
     echo "${name} is running as pid `cat $pidfile`."
   else
     echo "${name} is not running."
   fi
 }
 
 run_rc_command $1



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200607311440.k6VEeRje075982>