X-Git-Url: http://ftp.carnet.hr/carnet-debian/scm?a=blobdiff_plain;f=debian%2Fconfig;h=487ffe93c3667e54d591b042262808e521d34d36;hb=HEAD;hp=7782e4a12084e4f798dbe8424eb72a21c34eeb9d;hpb=d898c4a3e286e07ee0f5d379dcdb055795209add;p=mod-security-cn.git diff --git a/debian/config b/debian/config index 7782e4a..30a4473 100644 --- a/debian/config +++ b/debian/config @@ -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