File: php5-mapscript.prerm

package info (click to toggle)
mapserver 5.6.5-2%2Bsqueeze3
  • links: PTS, VCS
  • area: main
  • in suites: squeeze
  • size: 15,900 kB
  • ctags: 25,593
  • sloc: ansic: 201,813; cpp: 49,629; cs: 11,792; python: 5,233; perl: 3,249; sh: 1,199; makefile: 884; lex: 592; java: 466; xml: 373; yacc: 334; tcl: 158; ruby: 53
file content (35 lines) | stat: -rw-r--r-- 891 bytes parent folder | download | duplicates (3)
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

#DEBHELPER#

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