summaryrefslogtreecommitdiff
path: root/debian/phpbb3.prerm
diff options
context:
space:
mode:
authorOlivier Gayot <duskcoder@gmail.com>2018-03-12 22:57:42 +0100
committerOlivier Gayot <duskcoder@gmail.com>2018-03-12 22:57:42 +0100
commita8c22829d8e8845cd4ddf4ef8b61a1ed79edfffc (patch)
treef0ae554b863266fbe523582d1be09216436c7472 /debian/phpbb3.prerm
Imported from the SVN repository
http://svn.wolffelaar.nl/wsvn/phpbb/branches/jessie/ Signed-off-by: Olivier Gayot <duskcoder@gmail.com>
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#
+