diff options
Diffstat (limited to 'security/snort/files/snort.sh')
-rw-r--r-- | security/snort/files/snort.sh | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/security/snort/files/snort.sh b/security/snort/files/snort.sh new file mode 100644 index 000000000000..d737bfd76385 --- /dev/null +++ b/security/snort/files/snort.sh @@ -0,0 +1,36 @@ +#!/bin/sh +# $Id$ + +# PROVIDE: snort +# REQUIRE: DAEMON +# BEFORE: LOGIN +# KEYWORD: FreeBSD shutdown + +# Add the following lines to /etc/rc.conf to enable snort: +# snort_enable (bool): Set to YES to enable snort +# Default: NO +# snort_flags (str): Extra flags passed to snort +# Default: -Dq +# snort_interface (str): Network interface to sniff +# Default: "" +# snort_conf (str): Snort configuration file +# Default: ${PREFIX}/etc/snort.conf +# + +. %%RC_SUBR%% + +name="snort" +rcvar=`set_rcvar` + +command="%%PREFIX%%/bin/snort" + +load_rc_config $name + +[ -z "$snort_enable" ] && snort_enable="NO" +[ -z "$snort_conf" ] && snort_conf="%%PREFIX%%/etc/snort.conf" +[ -z "$snort_flags" ] && snort_flags="-Dq" + +[ -n "$snort_interface" ] && snort_flags="$snort_flags -i $snort_interface" +[ -n "$snort_conf" ] && snort_flags="$snort_flags -c $snort_conf" + +run_rc_command "$1" |