Ticket #20759: py25-denyhosts.diff
File py25-denyhosts.diff, 2.5 KB (added by nerdling (Jeremy Lavergne), 15 years ago) |
---|
-
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
7 7 name py25-denyhosts 8 8 version 2.6 9 9 categories-append security sysutils 10 #license GPL 10 11 maintainers snc openmaintainer 11 12 description DenyHosts is a utility to help sys admins thwart ssh hackers 12 13 long_description DenyHosts is a python program that automatically blocks ssh\ … … 33 34 reinplace s|@PYTHON@|${python.bin}| ${worksrcpath}/daemon-control-dist 34 35 reinplace s|@PREFIX@|${prefix}| ${worksrcpath}/daemon-control-dist 35 36 reinplace s|@PREFIX@|${prefix}| ${worksrcpath}/denyhosts.cfg-dist 37 reinplace s|@PREFIX@|${prefix}| ${filespath}/denyhosts.plist 36 38 } 37 39 40 pre-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 } 38 46 post-destroot { 47 ui_msg "" 39 48 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 "" 40 56 } 57 destroot.keepdirs ${destroot}${prefix}/var/run \ 58 ${destroot}${prefix}/var/log 41 59 42 startupitem.create yes43 startupitem.type launchd44 startupitem.start ${prefix}/share/denyhosts/daemon-control-dist start45 startupitem.stop ${prefix}/share/denyhosts/daemon-control-dist stop46 47 60 livecheck.name denyhosts