Snort mailing list archives

barnyard2 and Chef


From: Izz Noland <izz.noland () wepanow com>
Date: Wed, 3 Feb 2016 18:26:29 +0000

Not sure if this is even the right place for a barnyard2 question, much less an issue regarding chef.  My apologies in 
advance if this is not the right area.

So I have packaged barnyard2 into an RPM and have it as part of a chef cookbook for easy deployment for IDS sensors.  
Problem is, the command to start barnyard2 does not fully work via Chef, but works fine when I log into the server and 
start the service.  I'm running CentOS 6.7 and here is the code I am running as part of a larger init script:

      /usr/local/sbin/barnyard2.sh &
      sleep 10s

where barnyard2.sh is the following:
#!/bin/bash

WALDO="<%= node.wepa_ids_sensor.barnyard2.run_opts.WALDO %>"
ARCHIVEDIR="<%= node.wepa_ids_sensor.barnyard2.run_opts.ARCHIVEDIR %>"
CONFIGFILE="<%= node.wepa_ids_sensor.barnyard2.run_opts.CONFIGFILE %>"
LOGDIR="<%= node.wepa_ids_sensor.barnyard2.run_opts.LOGDIR %>"
LOGFILE="<%= node.wepa_ids_sensor.barnyard2.run_opts.LOGFILE %>"
SIDMAP="<%= node.wepa_ids_sensor.barnyard2.run_opts.SIDMAP %>"

while [ true ]
do
            barnyard2 -v -c $CONFIGFILE \
                                                                        -d $LOGDIR \
                                                                        -f $LOGFILE \
                                                                        -w $WALDO \
                                                                        -a $ARCHIVEDIR \
                                                                        -S $SIDMAP

            sleep 60s
done

this works fine when run via cli.  Anyone have any experience with something like this?

Thanks in advance,
Izz

Izz Noland
Sr. Systems Engineer
[wepa_logo-solid]<https://www.wepanow.com/>
[email-icons_03]izz.noland () wepanow com<mailto:izz.noland () wepanow com>
[email-icons_06]Toll Free 800.675.7639
[email-icons_05]100 Gilbert Drive | Alabaster, Alabama 35007

------------------------------------------------------------------------------
Site24x7 APM Insight: Get Deep Visibility into Application Performance
APM + Mobile APM + RUM: Monitor 3 App instances at just $35/Month
Monitor end-to-end web transactions and take corrective actions now
Troubleshoot faster and improve end-user experience. Signup Now!
http://pubads.g.doubleclick.net/gampad/clk?id=272487151&iu=/4140
_______________________________________________
Snort-users mailing list
Snort-users () lists sourceforge net
Go to this URL to change user options or unsubscribe:
https://lists.sourceforge.net/lists/listinfo/snort-users
Snort-users list archive:
http://sourceforge.net/mailarchive/forum.php?forum_name=snort-users

Please visit http://blog.snort.org to stay current on all the latest Snort news!

Current thread: