From: Zeljko Boros <Zeljko.Boros@carnet.hr>
Date: Thu, 15 Apr 2021 12:33:44 +0000 (+0200)
Subject: Dodana ovisnost o ipcalc i carnet-tools-cn, popravak postinsta
X-Git-Tag: debian/0.10.2+cn10u2^0
X-Git-Url: http://ftp.carnet.hr/carnet-debian/scm?a=commitdiff_plain;h=refs%2Fheads%2Fmaster;p=fail2ban-cn.git

Dodana ovisnost o ipcalc i carnet-tools-cn, popravak postinsta
---

diff --git a/debian/changelog b/debian/changelog
index 701578a..71a41a5 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,10 @@
+fail2ban-cn (0.10.2+cn10u2) stable; urgency=low
+
+  * Dodana ovisnost o carnet-tools-cn i ipcalc, popravak postinsta jer faila
+    ako je zakomentiran "ignoreip" u jail.conf
+
+ -- Zeljko Boros <Zeljko.Boros@carnet.hr>  Thu, 15 Apr 2021 14:31:59 +0200
+
 fail2ban-cn (0.10.2+cn10u1) stable; urgency=low
 
   * Prva verzija za buster
diff --git a/debian/control b/debian/control
index 6bf1fca..01d7ed1 100644
--- a/debian/control
+++ b/debian/control
@@ -2,12 +2,13 @@ Source: fail2ban-cn
 Section: net
 Priority: optional
 Maintainer: Ivan Rako <Ivan.Rako@CARNET.hr>
+Uploaders: Zeljko Boros <Zeljko.Boros@carnet.hr>
 Build-Depends: debhelper (>= 10)
 Standards-Version: 3.9.8
 
 Package: fail2ban-cn
 Architecture: all
-Depends: ${misc:Depends}, fail2ban (>= 0.10.2), gamin (>= 0.1.10-4.1), python-gamin (>= 0.1.10-4.1)
+Depends: ${misc:Depends}, carnet-tools-cn, ipcalc, fail2ban (>= 0.10.2), gamin (>= 0.1.10-4.1), python-gamin (>= 0.1.10-4.1)
 Description: bans IPs that cause multiple authentication errors
  Fail2ban monitors log files (e.g. /var/log/auth.log,
  /var/log/apache/access.log) and temporarily or persistently bans
diff --git a/debian/postinst b/debian/postinst
index 3d47138..a669349 100755
--- a/debian/postinst
+++ b/debian/postinst
@@ -48,7 +48,7 @@ if [ -e "$CONF" ]; then
     # add network address and class if needed
     cp_get_netaddr || true
     NETADDR="$RET"
-    IGNOREIP=$(grep '^ignoreip' "$CONF")
+    IGNOREIP=$(grep '^ignoreip' "$CONF" || true)
     if grep -q '^ignoreip' "$CONF"; then
         IGNOREIP=$(grep '^ignoreip' "$CONF")
         if ! echo "$IGNOREIP" | grep -q "$NETADDR"; then