43 lines
868 B
Bash
43 lines
868 B
Bash
#!/bin/sh
|
|
#
|
|
# $FreeBSD$
|
|
#
|
|
|
|
# PROVIDE: miltersid
|
|
# REQUIRE: DAEMON
|
|
# BEFORE: mail localpkg
|
|
|
|
# Define these miltersid_* variables in one of these files:
|
|
# /etc/rc.conf
|
|
# /etc/rc.conf.local
|
|
# /etc/rc.conf.d/miltersid
|
|
#
|
|
|
|
. %%RC_SUBR%%
|
|
|
|
name="miltersid"
|
|
rcvar=`set_rcvar`
|
|
load_rc_config $name
|
|
|
|
# DO NOT CHANGE THESE DEFAULT VALUES HERE
|
|
#
|
|
: ${miltersid_enable="NO"}
|
|
: ${miltersid_socket="local:/var/run/sid-filter"}
|
|
: ${miltersid_pid="/var/run/sid-filter.pid"}
|
|
: ${miltersid_flags="-r 0 -t"}
|
|
|
|
pidfile=${miltersid_pid}
|
|
command="%%PREFIX%%/libexec/sid-filter"
|
|
command_args="-l -p ${miltersid_socket} -P ${miltersid_pid}"
|
|
start_precmd="sid_precmd"
|
|
|
|
sid_precmd ()
|
|
{
|
|
if [ -S ${miltersid_socket##local:} ] ; then
|
|
rm -f ${miltersid_socket##local:}
|
|
elif [ -S ${miltersid_socket##unix:} ] ; then
|
|
rm -f ${miltersid_socket##unix:}
|
|
fi
|
|
}
|
|
|
|
run_rc_command "$1"
|