Ticket #20759: py25-denyhosts.diff

File py25-denyhosts.diff, 2.5 KB (added by nerdling (Jeremy Lavergne), 15 years ago)

planned changes

  • files/denyhosts.plist

     
     1<?xml version="1.0" encoding="UTF-8"?>
     2<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
     3<plist version="1.0">
     4<dict>
     5        <key>Disabled</key>
     6        <true/>
     7        <key>Label</key>
     8        <string>denyhosts</string>
     9        <key>ProgramArguments</key>
     10        <array>
     11                <string>/opt/local/share/denyhosts/daemon-control</string>
     12                <string>start</string>
     13        </array>
     14        <key>KeepAlive</key>
     15        <false/>
     16        <key>RunAtLoad</key>
     17        <true/>
     18</dict>
     19</plist>
  • Portfile

     
    77name                py25-denyhosts
    88version             2.6
    99categories-append   security sysutils
     10#license             GPL
    1011maintainers         snc openmaintainer
    1112description         DenyHosts is a utility to help sys admins thwart ssh hackers
    1213long_description    DenyHosts is a python program that automatically blocks ssh\
     
    3334    reinplace s|@PYTHON@|${python.bin}| ${worksrcpath}/daemon-control-dist
    3435    reinplace s|@PREFIX@|${prefix}| ${worksrcpath}/daemon-control-dist
    3536    reinplace s|@PREFIX@|${prefix}| ${worksrcpath}/denyhosts.cfg-dist
     37    reinplace s|@PREFIX@|${prefix}| ${filespath}/denyhosts.plist
    3638}
    3739
     40pre-destroot {
     41    xinstall -d ${destroot}${prefix}/var/run/
     42    xinstall -d ${destroot}${prefix}/var/log/
     43    xinstall -d ${destroot}${prefix}/Library/LaunchDaemons/
     44    xinstall -m 644 ${filespath}/denyhosts.plist ${destroot}${prefix}/Library/LaunchDaemons/
     45}
    3846post-destroot {
     47    ui_msg ""
    3948    ui_msg "    Please read ${prefix}/share/denyhosts/README.txt"
     49    ui_msg ""
     50    ui_msg "    You need to make config files in ${prefix}/share/denyhosts"
     51    ui_msg "    The files ending with '-dist' are examples for you to copy"
     52    ui_msg ""
     53    ui_msg "    A startup item is provided but disabled. to activate it, run"
     54    ui_msg "      sudo launchtl load -w /Library/LaunchDaemons/denyhosts.plist"
     55    ui_msg ""
    4056}
     57destroot.keepdirs   ${destroot}${prefix}/var/run \
     58                    ${destroot}${prefix}/var/log
    4159
    42 startupitem.create  yes
    43 startupitem.type    launchd
    44 startupitem.start   ${prefix}/share/denyhosts/daemon-control-dist start
    45 startupitem.stop    ${prefix}/share/denyhosts/daemon-control-dist stop
    46 
    4760livecheck.name      denyhosts