67edfebd6a
Package changes: - Add DSPAM_WWWUSER and DSPAM_WWWGROUP as BUILD_DEFS (not everyone uses apache) - Change group ownership on dspam.conf to ${DSPAM_WWWGROUP} Pointed out in tech-pkg@ by matt (at) bodgit-n-scarper.com - Remove patch-ac as that's been applied upstream - PLIST fixes for css* tools installed with hash driver From DSPAM RELEASE_NOTES: BUGFIX: ParseToHeaders can segfault on malformatted To header BUGFIX: TrackSources does not correctly parse messages when used with QMail BUGFIX: Missing check for existing strcasestr BUGFIX: X-DSPAM-Reclassified heading appears blank BUGFIX: Plused-Detail support does not work with domains BUGFIX: Hash databases are not 8-byte aligned (do not work with 64-bit systems) BUGFIX: Certain daemon-mode operations append a trailing period BUGFIX: DataSource 'document' option causes improper processing BUGFIX: Segfaults occur on malformed Content-Type header BUGFIX: History appears blank in dspam.cgi
66 lines
1.2 KiB
Bash
66 lines
1.2 KiB
Bash
#!@RCD_SCRIPTS_SHELL@
|
|
#
|
|
# $NetBSD: dspam.sh,v 1.5 2005/11/12 16:53:19 adrianp Exp $
|
|
#
|
|
|
|
# PROVIDE: dspam
|
|
# REQUIRE: SERVERS
|
|
# 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 &"
|
|
start_precmd="dspam_precmd"
|
|
|
|
dspam_precmd()
|
|
{
|
|
if [ ! -d @DSPAM_PIDDIR@ ]; then
|
|
@MKDIR@ @DSPAM_PIDDIR@
|
|
@CHMOD@ 0770 @DSPAM_PIDDIR@
|
|
@CHOWN@ @DSPAM_USER@ @DSPAM_PIDDIR@
|
|
@CHGRP@ @DSPAM_GROUP@ @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} ${dspam_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
|