freebsd-ports/security/bruteblock/files/bruteblockd.sh.in
Rong-En Fan 93af334482 Add bruteblock 0.0.4, software for blocking bruteforce attacks with
ipfw.

PR:		ports/101254
Submitted by:	Dmitry Marakasov <amdmi3 at mail.ru>
2006-08-17 08:27:13 +00:00

28 lines
541 B
Bash

#!/bin/sh
# PROVIDE: bruteblockd
# REQUIRE: NETWORKING syslogd
# KEYWORD: nojail
. %%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"