aboutsummaryrefslogtreecommitdiff
path: root/mail/dspam/files/dspam.in
diff options
context:
space:
mode:
Diffstat (limited to 'mail/dspam/files/dspam.in')
-rw-r--r--mail/dspam/files/dspam.in29
1 files changed, 17 insertions, 12 deletions
diff --git a/mail/dspam/files/dspam.in b/mail/dspam/files/dspam.in
index 1d35cf670382..e9256859a06c 100644
--- a/mail/dspam/files/dspam.in
+++ b/mail/dspam/files/dspam.in
@@ -1,7 +1,6 @@
#!/bin/sh
# $FreeBSD$
# formerly $ FreeBSD: ports/mail/dspam/files/dspam,v 1.1 2005/05/05 21:03:37 pav Exp $
-# $Tecnik: ports/mail/dspam/files/dspam.sh.in,v 1.6 2006/02/09 19:14:29 itetcu Exp $
#
# PROVIDE: dspam
@@ -11,32 +10,38 @@
#
# 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=`set_rcvar`
-
-load_rc_config $name
-
-
-: ${dspam_enable="NO"}
-: ${dspam_pidfile:-/var/run/dspam.pid}
+name="dspam"
+rcvar=${name}_enable
command=%%PREFIX%%/bin/${name}
-command_args="--daemon > /dev/null 2>&1 &"
+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`
}
+load_rc_config $name
+
+#defaults
+: ${dspam_enable="NO"}
+: ${dspam_debug="NO"}
+: ${dspam_pidfile:-/var/run/dspam.pid}
+
run_rc_command "$1"