[Snort-users] barnyard2 and Chef

Izz Noland izz.noland at ...17341...
Wed Feb 3 13:26:29 EST 2016


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 at ...17341...<mailto:izz.noland at ...17341...>
[email-icons_06]Toll Free 800.675.7639
[email-icons_05]100 Gilbert Drive | Alabaster, Alabama 35007

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.snort.org/pipermail/snort-users/attachments/20160203/a9086693/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image001.png
Type: image/png
Size: 6085 bytes
Desc: image001.png
URL: <https://lists.snort.org/pipermail/snort-users/attachments/20160203/a9086693/attachment.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image002.gif
Type: image/gif
Size: 130 bytes
Desc: image002.gif
URL: <https://lists.snort.org/pipermail/snort-users/attachments/20160203/a9086693/attachment.gif>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image003.gif
Type: image/gif
Size: 137 bytes
Desc: image003.gif
URL: <https://lists.snort.org/pipermail/snort-users/attachments/20160203/a9086693/attachment-0001.gif>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image004.gif
Type: image/gif
Size: 198 bytes
Desc: image004.gif
URL: <https://lists.snort.org/pipermail/snort-users/attachments/20160203/a9086693/attachment-0002.gif>


More information about the Snort-users mailing list