aboutsummaryrefslogtreecommitdiff
path: root/security/bruteblock/files/bruteblockd.sh.in
blob: ab42438e70577171b7d17857a405d4e9e7d0e104 (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
#!/bin/sh

# PROVIDE: bruteblockd
# REQUIRE: NETWORKING syslogd
# KEYWORD: nojail

. /etc/rc.subr

name="bruteblockd"
rcvar=`set_rcvar`

load_rc_config $name

: ${bruteblockd_enable="NO"}

pidfile="/var/run/${name}.pid"
command=%%PREFIX%%/sbin/${name}
command_args="-p ${pidfile} -t ${bruteblockd_table}"
start_precmd="bruteblockd_precmd"

bruteblockd_precmd()
{
	if [ -z "${bruteblockd_table}" ]; then
		err 1 "Please specify ipfw table number with bruteblockd_table parameter in /etc/rc.conf (see bruteblock(8))"
	fi
}

run_rc_command "$1"