From 8da31e446016462812cc9e64e57408047a98d52d Mon Sep 17 00:00:00 2001 From: Dinko Korunic Date: Wed, 11 May 2011 19:56:07 +0200 Subject: [PATCH] - fix za bug koji je uocio Ljubomir sa dashem kao shellom --- debian/postinst | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/debian/postinst b/debian/postinst index 6a57a0d..4ac4576 100755 --- a/debian/postinst +++ b/debian/postinst @@ -42,9 +42,7 @@ if [ -e /etc/default/iptables ]; then fi # check to see if fail2ban is installed -check=(fail2ban fail2ban-cn) -check=$(dpkg -s $check 2> /dev/null | egrep '^Package:|^Status:' | awk '{if ($1 ~ /^Package:/) { package=$2 } else if ($0 ~ /^Status: .* installed$/) { print package }}') -if [ "x$check" != "x" ]; then +if dpkg -l fail2ban | grep -q '^.i'; then echo "CN: Detected Fail2Ban installation, will remove SSH bruteforce rules by default" iptables -D SSH_Brute_Force -m recent ! --rcheck --seconds 90 \ --hitcount 3 --name SSH --rsource \ -- 1.7.10.4