blob: bf1f9a78fbc81907c66fb9796800c34905dfc995 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
|
#!/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"
|