Prva inacica paketa za Debian jessie distribuciju.
[squirrelmail-cn.git] / debian / postrm
1 #!/bin/sh
2
3 set -e
4
5 # Debconf
6 . /usr/share/debconf/confmodule
7
8 PKG=squirrelmail-cn
9
10 if [ -e /usr/share/apache2/apache2-maintscript-helper ]; then
11     . /usr/share/apache2/apache2-maintscript-helper
12
13     squirrelmail_enable() {
14         echo "CN: Purging $PKG configuration for Apache2."
15         return 0
16     }
17 else
18     echo "CN: Could not load Apache 2.4 maintainer script helper."
19
20     squirrelmail_enable() {
21         return 1
22     }
23 fi
24
25 if [ "$1" = "remove" -o "$1" = "abort-install" -o "$1" = "disappear" ]; then
26     dpkg-divert --package $PKG --remove --rename \
27         --divert /usr/share/squirrelmail/functions/strings.php.squirrelmail \
28         /usr/share/squirrelmail/functions/strings.php
29 fi
30
31 if [ "$1" = "purge" ] ; then
32     if squirrelmail_enable; then
33         apache2_invoke disconf $PKG
34     fi
35
36     if [ "`readlink -q -m /etc/apache2/conf-available/$PKG.conf`" = /etc/squirrelmail/apache.conf ]; then
37         rm -f /etc/apache2/conf-available/$PKG.conf
38     fi
39 fi
40
41 #DEBHELPER#
42
43 exit 0