There is a report that defining command_interpreter actually causes problem for spamd, athought it should not. While the reason is being investigated, the previous change has been reverted per maintainer's request. PR 196517
57 lines
1.1 KiB
Bash
57 lines
1.1 KiB
Bash
#!/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]"
|
|
#
|
|
# To keep your user-config in a SQL database, use
|
|
#
|
|
# spamd_flags="-Q"
|
|
#
|
|
# and remove -c (auto-create user preference files).
|
|
#
|
|
|
|
. /etc/rc.subr
|
|
|
|
name=spamd
|
|
rcvar=${name}_enable
|
|
|
|
extra_commands="reload"
|
|
load_rc_config $name
|
|
|
|
start_precmd="precmd"
|
|
restart_precmd="precmd"
|
|
|
|
# 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}"
|
|
#command_interpreter="%%PREFIX%%/bin/perl"
|
|
required_dirs="%%PREFIX%%/share/spamassassin"
|
|
|
|
precmd()
|
|
{
|
|
if [ ! -d /var/run/${name} ]; then
|
|
mkdir -p /var/run/${name}
|
|
chown %%SPAMD_OWN%% /var/run/${name}
|
|
fi
|
|
}
|
|
|
|
run_rc_command "$1"
|