aboutsummaryrefslogtreecommitdiff
path: root/mail/rbl-milter/files/rblmilter.in
blob: 89d1b1141acae305d9bcf4e810c22b6a21ef5ce6 (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
#!/bin/sh

# $FreeBSD$

# Start or stop rblmilter

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

# Define these rblmilter_* variables in one of these files:
#	/etc/rc.conf
#	/etc/rc.conf.local
#	/etc/rc.conf.d/rblmilter
#
# DO NOT CHANGE THESE DEFAULT VALUES HERE
#
rblmilter_enable=${rblmilter_enable:-"NO"}      # Enable rblmilter
rblmilter_socket=${rblmilter_socket:-"/var/run/rbl-milter"} # Path to socket
rblmilter_flags=${rblmilter_flags:-"-l -r -d relays.ordb.org"} # Flags to rblmilter

. /etc/rc.subr

name="rblmilter"
rcvar="rblmilter_enable"
command="%%PREFIX%%/sbin/rbl-milter"
start_precmd="rblmilter_prestart"
stop_postcmd="rblmilter_poststop"
extra_commands="reload"

rblmilter_prestart() {
	/bin/rm -f "${rblmilter_socket}"
}

rblmilter_poststop() {
	/bin/rm -f "${rblmilter_socket}"
}

load_rc_config $name
command_args="-p local:${rblmilter_socket} ${rblmilter_flags}"

run_rc_command "$1"

# eof