freebsd-ports/security/bruteblock/files/bruteblockd.in
Doug Barton 9aac569eaa Move the rc.d scripts of the form *.sh.in to *.in
Where necessary add $FreeBSD$ to the file

No PORTREVISION bump necessary because this is a no-op
2012-08-05 23:19:36 +00:00

30 lines
563 B
Bash

#!/bin/sh
# $FreeBSD$
#
# 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"