Ticket #5387: Portfile.diff

File Portfile.diff, 1.2 KB (added by dports@…, 19 years ago)

Portfile diff

  • Portfile

    old new  
    2424        depends_lib-append    port:mysql4
    2525        configure.args-append --with-mysql=${prefix}
    2626}
     27
     28variant 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
     41post-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
     47post-activate {
     48        ui_msg "\n
     49The Snort database schemas are in ${prefix}/share/${name}/schemas.
     50
     51If you used the server variant, make sure to place your snort.conf file in
     52the location ${prefix}/etc/${name} or the startup script cannot find it.
     53\n"
     54}