summaryrefslogtreecommitdiff
path: root/mail/spamassassin/files/sa-spamd.in
diff options
context:
space:
mode:
Diffstat (limited to 'mail/spamassassin/files/sa-spamd.in')
-rw-r--r--mail/spamassassin/files/sa-spamd.in39
1 files changed, 39 insertions, 0 deletions
diff --git a/mail/spamassassin/files/sa-spamd.in b/mail/spamassassin/files/sa-spamd.in
new file mode 100644
index 000000000000..fb2301c3a1da
--- /dev/null
+++ b/mail/spamassassin/files/sa-spamd.in
@@ -0,0 +1,39 @@
+#!/bin/sh
+#
+# $FreeBSD$
+#
+
+# PROVIDE: spamd
+# REQUIRE: LOGIN
+# BEFORE: mail
+# KEYWORD: shutdown
+
+#
+# Add the following line to /etc/rc.conf to enable spamd:
+#
+# spamd_enable="YES"
+#
+# You can pass flags to spamd with spamd_flags="..."
+# To change the user that spamd runs as, use
+#
+# spamd_flags="-u USER [-H /path/to/home... we suggest /var/spool/spamd]"
+#
+
+. /etc/rc.subr
+
+name=spamd
+rcvar=${name}_enable
+
+extra_commands="reload"
+load_rc_config $name
+
+# Set defaults
+: ${spamd_enable:="NO"}
+: ${spamd_flags="-c %%SQL_FLAG%% %%RUN_AS_USER%%"}
+
+pidfile=${spamd_pidfile:-"/var/run/${name}/${name}.pid"}
+command=%%PREFIX%%/bin/${name}
+command_args="-d -r ${pidfile}"
+required_dirs=%%PREFIX%%/share/spamassassin
+
+run_rc_command "$1"