diff options
author | xtraeme <xtraeme@pkgsrc.org> | 2005-03-21 21:35:52 +0000 |
---|---|---|
committer | xtraeme <xtraeme@pkgsrc.org> | 2005-03-21 21:35:52 +0000 |
commit | 3e5547df572ec240236f72d268d3add4b7400402 (patch) | |
tree | f6bfa7fd1e3bfaf669078e63de1fadca63591e9a /mail/dspam/files | |
parent | d9366b285144502efde50a1c6b86aeb930776a6c (diff) | |
download | pkgsrc-3e5547df572ec240236f72d268d3add4b7400402.tar.gz |
Update to 3.4.1.
Changes:
o Accuracy Enhancements
o Bayesian Noise Reduction v2.0
o TUM-Mode Enhancements
o Library Performance Enhancements
o PostgreSQL Storage Driver Enhancements
o SQLite3 Storage Driver Support
o Daemonized LMTP Server
o LMTP Delivery
And more... more info in the RELEASE.NOTES file.
pkgsrc changes:
o Add a dspam rc.d script to start the daemon.
o The cgi configuration files were modified to support
CONF_FILES and PKG_SYSCONFDIR.
When using a NetBSD system, mount_umap(8) will be useful to mount
the cgi directory with www permissions, and you won't need to modify
any file in there! yay.
Diffstat (limited to 'mail/dspam/files')
-rw-r--r-- | mail/dspam/files/dspam.sh | 70 |
1 files changed, 70 insertions, 0 deletions
diff --git a/mail/dspam/files/dspam.sh b/mail/dspam/files/dspam.sh new file mode 100644 index 00000000000..d0aa97c67c9 --- /dev/null +++ b/mail/dspam/files/dspam.sh @@ -0,0 +1,70 @@ +#!@RCD_SCRIPTS_SHELL@ +# +# $NetBSD: dspam.sh,v 1.1 2005/03/21 21:35:52 xtraeme Exp $ +# + +# PROVIDE: dspam +# BEFORE: DAEMON + +if [ -f /etc/rc.subr ]; then + . /etc/rc.subr +fi + +name="dspam" +rcvar="${name}" +command="@PREFIX@/bin/${name}" +pidfile="@DSPAM_PIDDIR@/${name}.pid" +command_args="--daemon > /dev/null 2>&1 &" +dspam_user="@DSPAM_USER@" +dspam_group="@DSPAM_GROUP@" +start_precmd="dspam_precmd" + +dspam_precmd() +{ + if [ ! -d @DSPAM_PIDDIR@ ]; then + @MKDIR@ @DSPAM_PIDDIR@ + @CHMOD@ 0700 @DSPAM_PIDDIR@ + @CHOWN@ @DSPAM_USER@ @DSPAM_PIDDIR@ + fi +} + +if [ -f /etc/rc.subr -a -f /etc/rc.conf -a -f /etc/rc.d/DAEMON ]; then + load_rc_config $name + run_rc_command "$1" +else + case ${1:-start} in + start) + dspam_precmd + if [ -x ${command} ]; then + echo "Starting ${name}." + eval ${command} ${distccd_flags} ${command_args} + fi + ;; + stop) + if [ -f ${pidfile} ]; then + pid=`/bin/head -1 ${pidfile}` + echo "Stopping ${name}." + kill -TERM ${pid} + else + echo "${name} not running?" + fi + ;; + restart) + ( $0 stop ) + sleep 1 + $0 start + ;; + status) + if [ -f ${pidfile} ]; then + pid=`/bin/head -1 ${pidfile}` + echo "${name} is running as pid ${pid}." + else + echo "${name} is not running." + fi + ;; + esac +fi + +if [ "$1" != "stop" -o "$1" != "status" ]; then + echo $(check_process $command) > $pidfile +fi |