80f154ea6aef3139b54e61cadcae05699ca24e06
[squirrelmail-cn.git] / debian / prerm
1 #!/bin/sh
2
3 set -e
4
5 case "$1" in
6   remove|deconfigure)
7
8     cp-update -r squirrelmail-cn /etc/squirrelmail/apache.conf
9
10     if [ -f /etc/apache2/conf.d/squirrelmail-cn.conf ]; then
11         rm -f /etc/apache2/conf.d/squirrelmail-cn.conf
12     fi
13
14     # Restart Apache2 web server.
15     #
16     if apache2ctl configtest 2>/dev/null; then
17         invoke-rc.d apache2 force-reload || true
18     else
19         echo "CN: Your Apache2 configuration is either broken or nonexistant."
20     fi
21
22     break
23     ;;
24   upgrade)
25     :
26     ;;
27   failed-upgrade)
28     ;;
29   *)
30     echo "prerm called with unknown argument \$1'" >&2
31     exit 0
32     ;;
33 esac
34
35 # dh_installdeb will replace this with shell code automatically
36 # generated by other debhelper scripts.
37
38 #DEBHELPER#
39
40 exit 0