X-Git-Url: http://ftp.carnet.hr/carnet-debian/scm?p=mod-security-cn.git;a=blobdiff_plain;f=debian%2Fprerm;h=bd99613f7c7622004ef49e6dbe9c88ed56832d4c;hp=5087d77316dc83cfffd50bc02251e2a1cb9cf66f;hb=a452628cc701ed542bbf1272dc48616032acb644;hpb=c2dd5bf0af4977fba1bca2c204a0414469bf4958 diff --git a/debian/prerm b/debian/prerm index 5087d77..bd99613 100644 --- a/debian/prerm +++ b/debian/prerm @@ -10,18 +10,17 @@ set -e # 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 } @@ -63,17 +62,9 @@ case "$1" in done # Restart Apache2 web server. - if [ $need_restart -eq 1 ]; then + if [ $need_restart -eq 1 ]; then if apache2ctl configtest 2>/dev/null; then - - # Restart Apache2 web server. - if [ -x "/etc/init.d/apache2" ]; then - if [ -x "`which invoke-rc.d 2>/dev/null`" ]; then - invoke-rc.d apache2 restart || true - else - /etc/init.d/apache2 restart || true - fi - fi + invoke-rc.d apache2 force-reload || true else # Something is broken. cp_echo "CN: Your Apache2 configuration seem to be broken." @@ -94,4 +85,6 @@ case "$1" in ;; esac +#DEBHELPER# + exit 0