summaryrefslogtreecommitdiff
path: root/denyhost/Pkgfile
blob: 325fe380efabc145ad449f5ed1077125aa8b4453 (plain)
    1 # Description: A script intended to be run by Linux system administrators to help thwart ssh server attacks. (fork of denyhosts)
    2 # URL: http://denyhost.sourceforge.net/
    3 # Maintainer: Danny Rawlins, crux at romster dot me
    4 # Packager: Danny Rawlins, crux at romster dot me
    5 # Depends on: python
    6 
    7 name=denyhost
    8 version=2.9
    9 release=1
   10 source=(http://downloads.sourceforge.net/project/$name/$name-$version/denyhosts-$version.tar.gz)
   11 
   12 build() {
   13 	cd DenyHosts-$version
   14 
   15 	/usr/bin/python setup.py install --root=$PKG
   16 
   17 	install -d $PKG/etc/{denyhosts,rc.d} $PKG/usr/sbin
   18 
   19 	mv $PKG/etc/denyhosts.conf \
   20 		$PKG/etc/denyhosts/denyhosts.conf
   21 
   22 	mv $PKG/usr/bin/daemon-control-dist \
   23 		$PKG/etc/rc.d/denyhosts
   24 
   25 	mv $PKG/usr/bin/denyhosts.py $PKG/usr/sbin/denyhosts
   26 
   27 	rmdir $PKG/usr/bin
   28 
   29 	sed -i \
   30 		-e 's|^DENYHOSTS_LOCK  = .*|DENYHOSTS_LOCK  = "/var/run/denyhosts.pid"|' \
   31 		-e 's|^DENYHOSTS_CFG   = .*|DENYHOSTS_CFG   = "/etc/denyhosts/denyhosts.conf"|' \
   32 		$PKG/etc/rc.d/denyhosts
   33 
   34 	sed -i \
   35 		-e 's|^SECURE_LOG = /var/log/auth.log|SECURE_LOG = /var/log/auth|' \
   36 		-e 's|^IPTABLES = /sbin/iptables|IPTABLES = /usr/sbin/iptables|' \
   37 		-e 's|^# BLOCKPORT = 22|BLOCKPORT = 22|' \
   38 		$PKG/etc/denyhosts/denyhosts.conf
   39 }

Generated by cgit