1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-12-23 04:23:08 +00:00
freebsd-ports/security/bro/files/bro.in
Steve Wills 3692c7df06 security/bro: Update to 2.5.1
Also, unbreak build with BROKER, add rc.d script

PR:		217656
Submitted by:	leres@ee.lbl.gov (maintainer)
2017-08-21 02:12:48 +00:00

82 lines
1.2 KiB
Bash

#!/bin/sh
#
# $FreeBSD$
#
# PROVIDE: bro
# REQUIRE: NETWORKING
# REQUIRE: LOGIN FILESYSTEMS
# KEYWORD: shutdown
. /etc/rc.subr
name="bro"
rcvar=`set_rcvar`
node=$2
start_cmd="bro_start"
stop_cmd="bro_stop"
restart_cmd="bro_restart"
deploy_cmd="bro_deploy"
install_cmd="bro_install"
cleanup_cmd="bro_cleanup"
restart_cmd="bro_restart"
status_cmd="bro_status"
extra_commands="deploy install cleanup status restart"
: ${broctl_program:=%%PREFIX%%/bin/broctl}
bro_enable=${bro_enable-"NO"}
bro_start() {
if [ ! "${node}" ];
then
$broctl_program start
else
$broctl_program start $node
fi
}
bro_stop() {
if [ ! "${node}" ];
then
$broctl_program stop
else
$broctl_program stop $node
fi
}
bro_restart() {
if [ ! "${node}" ];
then
$broctl_program restart
else
$broctl_program restart $node
fi
}
bro_deploy() {
$broctl_program deploy
}
bro_install() {
$broctl_program install
}
bro_cleanup() {
if [ ! "${node}" ];
then
$broctl_program cleanup
else
$broctl_program cleanup ${node}
fi
}
bro_status() {
$broctl_program status
}
load_rc_config $name
run_rc_command "$1"