contrib/denyhost/Pkgfile

42 lines
1.1 KiB
Plaintext
Raw Normal View History

# Description: A script intended to be run by Linux system administrators to help thwart ssh server attacks.
# URL: https://github.com/denyhosts/denyhosts
# Maintainer: unmaintained
# Depends on: python
name=denyhost
version=2.10
2014-11-21 12:32:14 +01:00
release=1
source=(https://github.com/denyhosts/denyhosts/archive/v$version/$name-$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
chmod g-w $PKG/usr/share/man/man8/$name* \
$PKG/etc/denyhosts.conf
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
}