X-Git-Url: http://ftp.carnet.hr/carnet-debian/scm?a=blobdiff_plain;f=debian%2Fpostrm;h=960d309df6e9e6f0cfbf8960ee19eb1703816702;hb=60afd8f0e7a1ebc0a5689b04b083ec37e3bf9945;hp=122c1284d2838aa71a19e419da738d11be9c233d;hpb=d6d471ca8237b76920e6c78385214ffe26ce6dc6;p=mod-security-cn.git diff --git a/debian/postrm b/debian/postrm index 122c128..960d309 100644 --- a/debian/postrm +++ b/debian/postrm @@ -11,48 +11,48 @@ MODSECLNK=/etc/apache2/conf-available/security2-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 + 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 } if [ -e /usr/share/apache2/apache2-maintscript-helper ]; then - . /usr/share/apache2/apache2-maintscript-helper - - modsecurity_enable() { - chk_conf_tag "$MODSECLNK" - if [ $RET -ne 2 ]; then - echo "CN: Purging $PKG configuration for Apache2." - return 0 - fi - return 1 + . /usr/share/apache2/apache2-maintscript-helper + + modsecurity_enable() { + chk_conf_tag "$MODSECLNK" + if [ $RET -ne 2 ]; then + echo "CN: Purging $PKG configuration for Apache2." + return 0 + fi + return 1 } else - echo "CN: Could not load Apache 2.4 maintainer script helper." + echo "CN: Could not load Apache 2.4 maintainer script helper." - modsecurity_enable() { - return 1 - } + modsecurity_enable() { + return 1 + } fi if [ "$1" = "purge" ] ; then - if modsecurity_enable; then - apache2_invoke disconf security2-cn - fi + if modsecurity_enable; then + apache2_invoke disconf security2-cn + fi fi #DEBHELPER#