prerm is in php5-mapscript 6.0.1-2ubuntu1.
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 | #!/bin/sh
set -e
if [ "$1" != "remove" ] && [ "$1" != "purge" ]; then
exit 0
fi
. /usr/share/debconf/confmodule
phpver=php5
for SAPI in `find /etc/$phpver/ -type d -maxdepth 1 -mindepth 1 | sed -e's#.*/##'`
do
# Use the same question for all extensions, because it's only
# used once per package: right here.
if [ -f "/etc/$phpver/$SAPI/php.ini" -a -f /etc/$phpver/$SAPI/conf.d/mapscript.ini ]; then
db_set $phpver-mapscript/remove_extension true
db_title "PHP"
db_subst $phpver-mapscript/remove_extension extname Mapscript
db_subst $phpver-mapscript/remove_extension sapiconfig $SAPI
db_input low $phpver-mapscript/remove_extension || true
db_go
db_get $phpver-mapscript/remove_extension
if [ "$RET" = "true" ]; then
rm -f /etc/$phpver/$SAPI/conf.d/mapscript.ini
fi
db_fset $phpver-mapscript/remove_extension seen false
fi
done
exit 0
|