aboutsummaryrefslogtreecommitdiff
path: root/mail/spamd/files
diff options
context:
space:
mode:
authorYen-Ming Lee <leeym@FreeBSD.org>2005-04-13 12:13:41 +0000
committerYen-Ming Lee <leeym@FreeBSD.org>2005-04-13 12:13:41 +0000
commit3e3e1721b2c9a3e092b6e4cdae14551b40c1d67b (patch)
tree8698b4a1a4ae39f19b24afc226817c005d11afc4 /mail/spamd/files
parentb8109f036babc25045e11f3fd63f97e0216d238f (diff)
Notes
Diffstat (limited to 'mail/spamd/files')
-rw-r--r--mail/spamd/files/pfspamd.sh39
-rw-r--r--mail/spamd/files/spamd.sh.sample40
2 files changed, 39 insertions, 40 deletions
diff --git a/mail/spamd/files/pfspamd.sh b/mail/spamd/files/pfspamd.sh
new file mode 100644
index 000000000000..5f82af096862
--- /dev/null
+++ b/mail/spamd/files/pfspamd.sh
@@ -0,0 +1,39 @@
+#!/bin/sh
+#
+# $FreeBSD$
+#
+
+# PROVIDE: pfspamd
+# REQUIRE: NETWORKING
+# BEFORE: mail
+# KEYWORD: shutdown
+
+#
+# Add the following lines to /etc/rc.conf to enable spamd:
+# pfspamd_enable (bool): Set to "NO" by default.
+# Set it to "YES" to enable spamd
+# pfspamd_flags (str): Set to "" by default.
+# Extra flags passed to start command.
+
+. %%RC_SUBR%%
+
+name="pfspamd"
+rcvar=`set_rcvar`
+
+command="%%PREFIX%%/libexec/spamd"
+start_postcmd="pfspamd_postcmd"
+restart_postcmd="pfspamd_postcmd"
+
+[ -z "$pfspamd_enable" ] && pfspamd_enable="NO"
+[ -z "$pfspamd_flags" ] && pfspamd_flags=""
+
+load_rc_config $name
+
+pfspamd_postcmd()
+{
+ if [ -x %%PREFIX%%/sbin/spamd-setup ]; then
+ %%PREFIX%%/sbin/spamd-setup
+ fi
+}
+
+run_rc_command "$1"
diff --git a/mail/spamd/files/spamd.sh.sample b/mail/spamd/files/spamd.sh.sample
deleted file mode 100644
index d393e1d00385..000000000000
--- a/mail/spamd/files/spamd.sh.sample
+++ /dev/null
@@ -1,40 +0,0 @@
-#!/bin/sh
-#
-# $FreeBSD: /tmp/pcvs/ports/mail/spamd/files/Attic/spamd.sh.sample,v 1.1 2003-09-29 23:01:21 edwin Exp $
-
-if ! PREFIX=$(expr $0 : "\(/.*\)/etc/rc\.d/$(basename $0)\$"); then
- echo "$0: Cannot determine the PREFIX" >&2
- echo "Please use the complete pathname." >&2
- exit 1
-fi
-
-if [ -z "${source_rc_confs_defined}" ]; then
- if [ -r /etc/defaults/rc.conf ]; then
- . /etc/defaults/rc.conf
- source_rc_confs
- elif [ -r /etc/rc.conf ]; then
- . /etc/rc.conf
- fi
-fi
-
-case "$1" in
-start)
- case "${spamd_enable}" in
- [Yy][Ee][Ss])
- echo -n ' spamd'
- ${PREFIX}/libexec/spamd ${spamd_flags}
- if [ -x ${PREFIX}/sbin/spamd-setup ]; then
- ${PREFIX}/sbin/spamd-setup
- fi
- ;;
- esac
- ;;
-stop)
- killall spamd
- ;;
-*)
- echo "Usage: `basename $0` {start|stop}" >&2
- ;;
-esac
-
-exit 0