Ticket #5387: Portfile.6.diff

File Portfile.6.diff, 1.4 KB (added by dports@…, 18 years ago)

Revised Portfile diff

  • Portfile

    old new  
    2424        depends_lib-append    port:mysql4
    2525        configure.args-append --with-mysql=${prefix}
    2626}
     27
     28variant 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
     35post-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
     50post-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
     58NOTE:   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