Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 31 Jan 2017 00:40:17 +0000
From:      bugzilla-noreply@freebsd.org
To:        freebsd-ports-bugs@FreeBSD.org
Subject:   [Bug 212433] security/bro: Add rc script to work with rc.conf
Message-ID:  <bug-212433-13-hTkxtBrsbW@https.bugs.freebsd.org/bugzilla/>
In-Reply-To: <bug-212433-13@https.bugs.freebsd.org/bugzilla/>
References:  <bug-212433-13@https.bugs.freebsd.org/bugzilla/>

next in thread | previous in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D212433

--- Comment #2 from Shirkdog <mshirk@daemon-security.com> ---
I added the "bro_program" variable for "service bro status" which seems to =
work
with 2.5 on FreeBSD 11/12

So as a starting point, this gives a start, stop and status command via the=
 new
features in Bro.=20


#!/bin/sh
#
# PROVIDE: bro
# REQUIRE: NETWORKING
# REQUIRE: LOGIN
# KEYWORD: shutdown
#

PATH=3D/sbin:/bin:/usr/sbin:/usr/bin:/usr/local/sbin:/usr/local/bin:

. /etc/rc.subr

name=3D"bro"
rcvar=3D`set_rcvar`

load_rc_config $name

start_cmd=3D"bro_start"
stop_cmd=3D"bro_stop"
restart_cmd=3D"bro_restart"

: ${broctl_program:=3D/usr/local/bin/broctl}
: ${bro_program:=3D/usr/local/bin/bro}

bro_enable=3D${bro_enable-"NO"}

bro_start() {
    $broctl_program deploy
}

bro_stop() {
    $broctl_program stop
}

bro_restart() {
    bro_stop
    bro_start
}

run_rc_command "$1"

--=20
You are receiving this mail because:
You are the assignee for the bug.=



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-212433-13-hTkxtBrsbW>