aboutsummaryrefslogtreecommitdiffstats
path: root/mail/spamilter/files/spamilter.sh.in
blob: d1247ce5ea335d5c3403fd43fdbcb75b6663d786 (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
#!/bin/sh

# $FreeBSD$

# Start or stop spamilter

# PROVIDE: spamilter
# REQUIRE: DAEMON
# BEFORE: mail
# KEYWORD: shutdown
#

prefix=%%PREFIX%%

# Define these spamilter_* variables in one of these files:
#   /etc/rc.conf
#   /etc/rc.conf.local
#   /etc/rc.conf.d/spamilter
#
# DO NOT CHANGE THESE DEFAULT VALUES HERE
#
spamilter_enable=${spamilter_enable:-"NO"}      # Enable spamilter-milter
spamilter_flags=${spamilter_flags:-""} # Flags to spamilter

. /etc/rc.subr

name="spamilter"
rcvar=`set_rcvar`
command="${prefix}/bin/spamilter"
pidfile="/tmp/Spamilter.pid"
required_files="${prefix}/etc/spamilter.rc"
start_precmd="spamilter_prestart"
stop_postcmd="spamilter_poststop"

spamilter_prestart() {
    /bin/rm -f "${pidfile}"
}

spamilter_poststop() {
    /bin/rm -f "${pidfile}"
}

load_rc_config $name

command_args="${spamilter_flags}"

run_rc_command "$1"

# eof