| 27 | |
| 28 | variant server { |
| 29 | xinstall -d ${destroot}${prefix}/bin |
| 30 | xinstall -m 755 ${filesdir}/snort.sh ${destroot}${prefix}/bin |
| 31 | |
| 32 | # A 60 second sleep time is used to allow MySQL to startup fully after boot so Snort won't bail |
| 33 | reinplace "s|placeholder|sleep 60 ; ${prefix}/bin/snort -c ${prefix}/etc/snort/snort.conf|g" \ |
| 34 | ${destroot}${prefix}/bin/snort.sh |
| 35 | |
| 36 | startupitem.create yes |
| 37 | startupitem.start "${prefix}/bin/snort.sh -c ${prefix}/etc/${name}/snort.conf" |
| 38 | startupitem.stop "killall ${name}" |
| 39 | } |
| 40 | |
| 41 | post-destroot { |
| 42 | # Copy the Snort database schemas |
| 43 | xinstall -d -m 755 ${destroot}${prefix}/share/${name}/schemas |
| 44 | eval xinstall -m 755 [glob ${worksrcpath}/schemas/create*] ${destroot}${prefix}/share/${name}/schemas |
| 45 | } |
| 46 | |
| 47 | post-activate { |
| 48 | ui_msg "\n |
| 49 | The Snort database schemas are in ${prefix}/share/${name}/schemas. |
| 50 | |
| 51 | If you used the server variant, make sure to place your snort.conf file in |
| 52 | the location ${prefix}/etc/${name} or the startup script cannot find it. |
| 53 | \n" |
| 54 | } |