X-Git-Url: http://ftp.carnet.hr/carnet-debian/scm?a=blobdiff_plain;f=debian%2Fprerm;h=80f154ea6aef3139b54e61cadcae05699ca24e06;hb=refs%2Ftags%2Fv2%251.4.21%2B2;hp=db2980aa76dcb009d9fc17b4ec8e7fa0b0aa8ab1;hpb=652c23a8c246d2a9ce4971fadf9a56c37e69a498;p=squirrelmail-cn.git diff --git a/debian/prerm b/debian/prerm index db2980a..80f154e 100644 --- a/debian/prerm +++ b/debian/prerm @@ -5,33 +5,36 @@ set -e case "$1" in remove|deconfigure) - cp-update -r squirrelmail-cn /etc/squirrelmail/apache.conf - - if [ -f /etc/apache2/conf.d/squirrelmail-cn.conf ]; then - rm -f /etc/apache2/conf.d/squirrelmail-cn.conf - fi - - # 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 force-reload || exit $? - else - /etc/init.d/apache2 force-reload || exit $? - fi - fi - - break - ;; + cp-update -r squirrelmail-cn /etc/squirrelmail/apache.conf + + if [ -f /etc/apache2/conf.d/squirrelmail-cn.conf ]; then + rm -f /etc/apache2/conf.d/squirrelmail-cn.conf + fi + + # Restart Apache2 web server. + # + if apache2ctl configtest 2>/dev/null; then + invoke-rc.d apache2 force-reload || true + else + echo "CN: Your Apache2 configuration is either broken or nonexistant." + fi + + break + ;; upgrade) - : - ;; + : + ;; failed-upgrade) - ;; + ;; *) - echo "prerm called with unknown argument \$1'" >&2 - exit 0 - ;; + echo "prerm called with unknown argument \$1'" >&2 + exit 0 + ;; esac +# dh_installdeb will replace this with shell code automatically +# generated by other debhelper scripts. + +#DEBHELPER# + exit 0