aboutsummaryrefslogtreecommitdiff
path: root/security/bruteblock/files/bruteblockd.sh.in
blob: 51de2ea736357f8789b10a4db5f7930780c15c2c (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=bruteblockd_enable

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"