ports/mail/dspam/files/dspam.in
Erwin Lansing ca057e2593 Fix warning.
PR:		96818
Submitted by:	Artis Caune <Artis.Caune@latnet.lv>
Approved by:	maintainer
2006-05-05 12:27:34 +00:00

47 lines
933 B
Bash

#!/bin/sh
# $FreeBSD$
# formerly $ FreeBSD: ports/mail/dspam/files/dspam,v 1.1 2005/05/05 21:03:37 pav Exp $
#
# PROVIDE: dspam
# REQUIRE: DAEMON %%MYSQL%% %%PGSQL%% %%CLAMD%%
# BEFORE: mail
# KEYWORD: shutdown
#
# Add the following lines to /etc/rc.conf[.local] to enable dspam:
# dspam_enable="YES"
#
# dspam_debug="YES" will start dspam with debug logging (you need ar least WITH_DEBUG)
# you can also set the pid file via dspam_pidfile
#
. %%RC_SUBR%%
name="dspam"
rcvar=${name}_enable
load_rc_config $name
#defaults
: ${dspam_enable="NO"}
: ${dspam_debug="NO"}
: ${dspam_pidfile:-/var/run/dspam.pid}
command=%%PREFIX%%/bin/${name}
if checkyesno dspam_debug
then
command_args="--daemon --debug > /dev/null 2>&1 &"
else
command_args="--daemon > /dev/null 2>&1 &"
fi
required_dirs=%%DSPAM_HOME%%
required_files=%%PREFIX%%/etc/${name}.conf
extra_commands=reload
reload()
{
kill -HUP `cat $pidfile`
}
run_rc_command "$1"