blob: a08cb782127159da1805614df6f40e6cebf839e2 (
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 mv $PKG/usr/share/man $PKG/usr/man
27
28 rmdir $PKG/usr/share $PKG/usr/bin
29
30 sed -i \
31 -e 's|^DENYHOSTS_LOCK = .*|DENYHOSTS_LOCK = "/var/run/denyhosts.pid"|' \
32 -e 's|^DENYHOSTS_CFG = .*|DENYHOSTS_CFG = "/etc/denyhosts/denyhosts.conf"|' \
33 $PKG/etc/rc.d/denyhosts
34
35 sed -i \
36 -e 's|^SECURE_LOG = /var/log/auth.log|SECURE_LOG = /var/log/auth|' \
37 -e 's|^IPTABLES = /sbin/iptables|IPTABLES = /usr/sbin/iptables|' \
38 -e 's|^# BLOCKPORT = 22|BLOCKPORT = 22|' \
39 $PKG/etc/denyhosts/denyhosts.conf
40 }
|