File: php5-mapscript.prerm

package info (click to toggle)
mapserver 5.0.3-3%2Blenny7
  • links: PTS, VCS
  • area: main
  • in suites: lenny
  • size: 13,556 kB
  • ctags: 12,645
  • sloc: ansic: 168,024; cs: 8,534; python: 4,618; sh: 4,213; cpp: 4,059; perl: 2,781; makefile: 787; lex: 564; java: 415; 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