| 27 | |
| 28 | variant server { |
| 29 | |
| 30 | startupitem.create yes |
| 31 | startupitem.start "${prefix}/share/${name}/snort.sh" |
| 32 | startupitem.stop "/bin/kill \$(cat /var/run/snort_*.pid)" |
| 33 | } |
| 34 | |
| 35 | post-destroot { |
| 36 | # Copy the Snort database schemas and sample snort.conf |
| 37 | xinstall -d -m 755 ${destroot}${prefix}/share/${name}/schemas |
| 38 | eval xinstall -m 755 [glob ${worksrcpath}/schemas/create*] ${destroot}${prefix}/share/${name}/schemas |
| 39 | xinstall -d -m 755 ${destroot}${prefix}/etc/${name} |
| 40 | xinstall -m 755 ${worksrcpath}/etc/snort.conf ${destroot}${prefix}/etc/${name} |
| 41 | |
| 42 | if { [variant_isset server] } { |
| 43 | xinstall -m 755 ${portpath}/${filesdir}/snort.sh ${destroot}${prefix}/share/${name} |
| 44 | |
| 45 | # A 60 second sleep time is used to allow MySQL to startup fully after boot so Snort won't bail |
| 46 | reinplace "s|placeholder|echo Snort will start in 60s ; sleep 60 ; ${prefix}/bin/snort -D -c ${prefix}/etc/snort/snort.conf|g" \ |
| 47 | ${destroot}${prefix}/share/${name}/snort.sh |
| 48 | } |
| 49 | } |
| 50 | |
| 51 | post-activate { |
| 52 | ui_msg "\n |
| 53 | |
| 54 | ***** File locations ***** |
| 55 | |
| 56 | The Snort database schemas -> ${prefix}/share/${name}/schemas |
| 57 | The snort.conf sample file -> ${prefix}/etc/${name} |
| 58 | |
| 59 | NOTE: If you installed Snort using the +server variant, make sure you do not |
| 60 | change the location of the snort.conf file or the startup scripts |
| 61 | will not be able to find it. |
| 62 | \n" |
| 63 | |
| 64 | } |
| 65 | |