-case "$1" in
- purge|remove|upgrade|failed-upgrade|abort-install|abort-upgrade|disappear)
- dpkg-divert --package squirrelmail-cn --remove --rename \
- --divert /usr/share/squirrelmail/functions/strings.php.squirrelmail \
+# Debconf
+. /usr/share/debconf/confmodule
+
+PKG=squirrelmail-cn
+
+if [ -e /usr/share/apache2/apache2-maintscript-helper ]; then
+ . /usr/share/apache2/apache2-maintscript-helper
+
+ squirrelmail_enable() {
+ echo "CN: Purging $PKG configuration for Apache2."
+ return 0
+ }
+else
+ echo "CN: Could not load Apache 2.4 maintainer script helper."
+
+ squirrelmail_enable() {
+ return 1
+ }
+fi
+
+if [ "$1" = "remove" -o "$1" = "abort-install" -o "$1" = "disappear" ]; then
+ dpkg-divert --package $PKG --remove --rename \
+ --divert /usr/share/squirrelmail/functions/strings.php.squirrelmail \