Prva verzija za buster.
[mod-security-cn.git] / debian / config
index 7782e4a..30a4473 100644 (file)
@@ -6,55 +6,52 @@ set -e
 . /usr/share/debconf/confmodule
 
 if [ "$1" != reconfigure ]; then
-        db_fget mod-security-cn/rbl seen
-        if [ "$RET" = "true" ]; then
-            exit 0
-        fi
+  db_fget mod-security-cn/rbl seen
+  if [ "$RET" = "true" ]; then
+    exit 0
+  fi
 fi
 
 A2DIR="/etc/apache2"
-CONFDIR="$A2DIR/conf.d"
-MODSECCONF="$CONFDIR/mod-security-cn.conf"
+MODSECDIR="$A2DIR/mod-security"
+MODSECCONF="$MODSECDIR/mod-security-cn.conf"
 
 
 # chk_conf_tag ()
 #
-#   Check if configuration file has CARNet package info lines.
+#   Check if configuration file has CARNET package info lines.
 #   return:  $RET => 0 - tagged
 #                    1 - file does not exists
 #                    2 - file exists, but it is not tagged
 #
 chk_conf_tag () {
-
-        local conf_file
-        conf_file="$1"
-        RET=1
-        
-        if [ -f "$conf_file" ]; then
-            if egrep -q "^## Begin - Generated by CARNet package mod-security-cn$" "$conf_file"; then
-                RET=0
-            else
-                RET=2
-            fi
-        fi
+  local conf_file
+  conf_file="$1"
+  RET=1
+
+  if [ -f "$conf_file" ]; then
+    if egrep -q "^## Begin - Generated by CARNET package mod-security-cn$" "$conf_file"; then
+      RET=0
+    else
+      RET=2
+    fi
+  fi
 }
 
 
-# Check for CARNet ModSecurity configuration file.
+# Check for CARNET ModSecurity configuration file.
 #
 chk_conf_tag "$MODSECCONF"
 if [ $RET -eq 0 ] || [ $RET -eq 1 ]; then
-
-        # Configuration file is tagged or does not exist - ask user
-        # for RBL.
-        db_title mod-security-cn - konfiguracija
-        db_input critical mod-security-cn/rbl || true
-        db_go || true
+  # Configuration file is tagged or does not exist - ask user
+  # for RBL.
+  db_title mod-security-cn - konfiguracija
+  db_input critical mod-security-cn/rbl || true
+  db_go || true
 else
-
-        # Configuration file is not tagged - skip question.
-        db_set mod-security-cn/rbl false || true
-        db_fset mod-security-cn/rbl seen true
+  # Configuration file is not tagged - skip question.
+  db_set mod-security-cn/rbl false || true
+  db_fset mod-security-cn/rbl seen true
 fi
 
 exit 0