Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 06 Sep 2016 21:47:44 +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@https.bugs.freebsd.org/bugzilla/>

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

            Bug ID: 212433
           Summary: security/bro: Add rc script to work with rc.conf
           Product: Ports & Packages
           Version: Latest
          Hardware: Any
                OS: Any
            Status: New
          Severity: Affects Only Me
          Priority: ---
         Component: Individual Port(s)
          Assignee: freebsd-ports-bugs@FreeBSD.org
          Reporter: mshirk@daemon-security.com
                CC: leres@ee.lbl.gov
             Flags: maintainer-feedback?(leres@ee.lbl.gov)
                CC: leres@ee.lbl.gov

In the latest Bro port for 2.4.1, a basic RC script is missing to allow for
users to startup bro with the init system on system boot.

I have a script I have used for a while now, it utilizes the new features in
Bro (such as broctl deploy) to handle starting up and shutdown. Status is
tricky, as you use broctl for status.

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

. /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_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>