| 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 \ |
| 44 | ${destroot}${prefix}/share/${name}/snort.sh |
| 45 | reinplace "s|__PREFIX__|${prefix}|g" \ |
| 46 | ${destroot}${prefix}/share/${name}/snort.sh |
| 47 | } |
| 48 | } |
| 49 | |
| 50 | post-activate { |
| 51 | ui_msg "\n |
| 52 | |
| 53 | ***** File locations ***** |
| 54 | |
| 55 | The Snort database schemas -> ${prefix}/share/${name}/schemas |
| 56 | The snort.conf sample file -> ${prefix}/etc/${name} |
| 57 | |
| 58 | NOTE: If you installed Snort using the +server variant, make sure you do not |
| 59 | change the location of the snort.conf file or the startup scripts |
| 60 | will not be able to find it. |
| 61 | \n" |
| 62 | |
| 63 | } |
| 64 | |