blob: a54c36f0aac2bbbd47b7c5a8a485c1528e4d7354 (
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
44
45
46
47
48
49
50
51
52
53
54
55
56
|
#!/bin/sh
#
# <<<Add FreeBSD CVS ID here!>>>
#
# PROVIDE: spamass-milter
# REQUIRE: LOGIN
# BEFORE: mail
# KEYWORD: FreeBSD shutdown
#
# Add the following lines to /etc/rc.conf to enable spamass-milter:
#
#spamass_milter_enable="YES"
#
# See spamass-milter(8) for flags.
#
. %%RC_SUBR%%
name=spamass_milter
rcvar=`set_rcvar`
command=%%PREFIX%%/sbin/spamass-milter
required_dirs=%%PREFIX%%/share/spamassassin
start_postcmd=start_postcmd
stop_postcmd=stop_postcmd
start_postcmd()
{
if test -f /var/run/sendmail.pid
then
sleep 1
kill -HUP `head -1 /var/run/sendmail.pid`
fi
}
stop_postcmd()
{
rm -f ${spamass_milter_socket}
if test -f /var/run/sendmail.pid
then
sleep 1
kill -HUP `head -1 /var/run/sendmail.pid`
fi
}
# set defaults
spamass_milter_enable=${spamass_milter_enable:-"NO"}
spamass_milter_socket=${spamass_milter_socket:-"/var/run/spamass-milter.sock"}
spamass_milter_flags=${spamass_milter_flags:-"-f -p ${spamass_milter_socket}"}
load_rc_config ${name}
run_rc_command "$1"
|