X-Git-Url: http://ftp.carnet.hr/carnet-debian/scm?p=squirrelmail-cn.git;a=blobdiff_plain;f=debian%2Fprerm;fp=debian%2Fprerm;h=80f154ea6aef3139b54e61cadcae05699ca24e06;hp=459bac8fbd69f1b6e71ac0085b6206687938cbd7;hb=10e1b23107ae734fcaa2efa79eac426ddc9e9bd7;hpb=5c9cb61bd99bcc06acd6d775ce2ab28175f9fe09 diff --git a/debian/prerm b/debian/prerm index 459bac8..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 restart || exit $? - else - /etc/init.d/apache2 restart || 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