summaryrefslogtreecommitdiff
path: root/debian/phpbb3.prerm
diff options
context:
space:
mode:
Diffstat (limited to 'debian/phpbb3.prerm')
-rwxr-xr-xdebian/phpbb3.prerm58
1 files changed, 58 insertions, 0 deletions
diff --git a/debian/phpbb3.prerm b/debian/phpbb3.prerm
new file mode 100755
index 0000000..91bc5dd
--- /dev/null
+++ b/debian/phpbb3.prerm
@@ -0,0 +1,58 @@
+#!/bin/sh
+# prerm script for phpbb3
+#
+# see: dh_installdeb(1)
+#
+# possible calls: remove, upgrade, failed-upgrade, deconfigure
+
+set -e
+
+if [ "$PB3DEBUG" = "maint" ]; then
+ echo "[maint] $0 $@" >&2
+fi
+if [ "$PB3DEBUG" = "sh" ]; then
+ set -x
+fi
+
+. /usr/share/phpbb3/maint-libs/webapps-config
+. /usr/share/phpbb3/maint-libs/dbapps-lib
+
+. /usr/share/debconf/confmodule
+. /usr/share/dbconfig-common/dpkg/prerm
+
+case "$1" in
+ remove|deconfigure)
+## removal of webserver config analogous to postinst
+ db_get phpbb3/httpd
+ webservers="$RET"
+ reload=""
+ for webserver in $webservers; do
+ webserver=${webserver%,}
+ purge_webserver_config phpbb3 $webserver 50
+ reload_webserver phpbb3 $webserver
+ done
+ ;;
+
+ upgrade)
+ # purge the caches when up- (or down-) grading
+ # (see also http://www.debian.org/doc/maint-guide/ch-update.en.html#s-upgrading)
+ rm -Rf /var/cache/phpbb3/cache/*
+ ;;
+
+ failed-upgrade)
+ ;;
+
+ *)
+ echo "prerm called with unknown argument \`$1'" >&2
+ exit 1
+ ;;
+esac
+
+dc_dbg
+
+dbc_go phpbb3 $@
+
+dc_dbg
+
+#DEBHELPER#
+