r1: [svn-inject] Installing original source of squirrelmail-cn
[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 [ -x "/etc/init.d/apache2" ]; then
17                 if [ -x "`which invoke-rc.d 2>/dev/null`" ]; then
18                     invoke-rc.d apache2 force-reload || exit $?
19                 else
20                     /etc/init.d/apache2 force-reload || exit $?
21                 fi
22         fi
23
24         break
25         ;;
26   upgrade)
27         :
28         ;;
29   failed-upgrade)
30         ;;
31   *)
32         echo "prerm called with unknown argument \$1'" >&2
33         exit 0
34         ;;
35 esac
36
37 exit 0