contrib/denyhost/Pkgfile

40 lines
1.2 KiB
Plaintext
Raw Normal View History

# Description: A script intended to be run by Linux system administrators to help thwart ssh server attacks. (fork of denyhosts)
2014-11-21 12:32:14 +01:00
# URL: http://denyhost.sourceforge.net/
2014-11-10 13:28:07 +01:00
# Maintainer: Danny Rawlins, crux at romster dot me
# Packager: Danny Rawlins, crux at romster dot me
# Depends on: python
name=denyhost
2014-11-21 12:32:14 +01:00
version=2.9
release=1
source=(http://downloads.sourceforge.net/project/$name/$name-$version/denyhosts-$version.tar.gz)
build() {
cd DenyHosts-$version
2014-04-21 17:15:44 +02:00
/usr/bin/python setup.py install --root=$PKG
2020-01-21 12:04:04 +01:00
2014-11-21 12:32:14 +01:00
install -d $PKG/etc/{denyhosts,rc.d} $PKG/usr/sbin
2020-01-21 12:04:04 +01:00
2014-11-21 12:32:14 +01:00
mv $PKG/etc/denyhosts.conf \
$PKG/etc/denyhosts/denyhosts.conf
2020-01-21 12:04:04 +01:00
2014-11-21 12:32:14 +01:00
mv $PKG/usr/bin/daemon-control-dist \
$PKG/etc/rc.d/denyhosts
2020-01-21 12:04:04 +01:00
2014-11-21 12:32:14 +01:00
mv $PKG/usr/bin/denyhosts.py $PKG/usr/sbin/denyhosts
2020-01-21 12:04:04 +01:00
rmdir $PKG/usr/bin
2014-11-21 12:32:14 +01:00
sed -i \
-e 's|^DENYHOSTS_LOCK = .*|DENYHOSTS_LOCK = "/var/run/denyhosts.pid"|' \
-e 's|^DENYHOSTS_CFG = .*|DENYHOSTS_CFG = "/etc/denyhosts/denyhosts.conf"|' \
$PKG/etc/rc.d/denyhosts
sed -i \
-e 's|^SECURE_LOG = /var/log/auth.log|SECURE_LOG = /var/log/auth|' \
-e 's|^IPTABLES = /sbin/iptables|IPTABLES = /usr/sbin/iptables|' \
-e 's|^# BLOCKPORT = 22|BLOCKPORT = 22|' \
$PKG/etc/denyhosts/denyhosts.conf
}