Hi,
I am using ids-tools to convert read unified2 log files from security/snort and output events as JSON. I've written a rc.d script to start ids-tools at start-up but it doesn't appear to work.
This is the rc.d script I've drafted. I am terrible at shell scripting. Could someone help me debug the script and get it to work.
Many thanks
Khaine
I am using ids-tools to convert read unified2 log files from security/snort and output events as JSON. I've written a rc.d script to start ids-tools at start-up but it doesn't appear to work.
This is the rc.d script I've drafted. I am terrible at shell scripting. Could someone help me debug the script and get it to work.
Code:
#!/bin/sh
# PROVIDE: u2eve
# REQUIRE: DAEMON
# BEFORE: LOGIN
# KEYWORD: shutdown
. /etc/rc.subr
name="u2eve"
rcvar="u2eve_enable"
load_rc_config $name
: ${u2eve_enable:="NO"}
# daemon
start_precmd=u2eve_enable_prestart
command=/usr/sbin/daemon
pidfile="/var/run/${name}"
command_args="-rP ${pidfile} /usr/local/bin/idstools-u2eve --directory /var/log/snort/ --snort-conf /usr/local/etc/snort/snort.conf --prefix snort.alert --follow --bookmark --delete --output /var/log/snort/snort.json"
Many thanks
Khaine