X-Git-Url: http://ftp.carnet.hr/carnet-debian/scm?a=blobdiff_plain;f=debian%2Fprerm;h=5087d77316dc83cfffd50bc02251e2a1cb9cf66f;hb=c2dd5bf0af4977fba1bca2c204a0414469bf4958;hp=e9c9a1396ce32cfc14f8e9282c183bcc7380deb3;hpb=eae9627db45a5346d7c6ee014dfa626848410e65;p=mod-security-cn.git diff --git a/debian/prerm b/debian/prerm index e9c9a13..5087d77 100644 --- a/debian/prerm +++ b/debian/prerm @@ -36,6 +36,8 @@ case "$1" in CONFDIR="$A2DIR/conf.d" MODSECDIR="$A2DIR/mod-security" MODSECCONF="$MODSECDIR/mod-security-cn.conf" + MODSECRBL="$MODSECDIR/rbl_lookup.conf" + MODSECLNK="$CONFDIR/$(basename $MODSECCONF)" need_restart=0 @@ -43,22 +45,22 @@ case "$1" in # Disable ModSecurity configuration. chk_conf_tag "$MODSECCONF" if [ $RET -eq 0 ]; then - if [ -e "$CONFDIR/mod-security-cn.conf" ]; then + if [ -e "$MODSECLNK" ]; then cp_echo "CN: Disabling ModSecurity configuration." - rm -f "$CONFDIR/mod-security-cn.conf" + rm -f "$MODSECLNK" need_restart=1 fi fi # Remove configuration files generated by this CARNet package. - for file in "$MODSECCONF" "$MODSECDIR/rbl_lookup.conf"; do + for file in "$MODSECCONF" "$MODSECRBL"; do chk_conf_tag "$file" if [ $RET -eq 0 ]; then cp_echo "CN: Removing configuration file $file" rm -f $file need_restart=1 fi - fi + done # Restart Apache2 web server. if [ $need_restart -eq 1 ]; then