prerm is in phpbb3 3.0.12-1.
This file is a maintainer script. It is executed when installing (*inst) or removing (*rm) the package.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 | #!/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
|