This file is indexed.

prerm is in sugarplum 0.9.10-17.2.

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
#!/bin/sh
set -e

do_unconf=""
. /usr/share/debconf/confmodule

for s in apache apache-ssl apache-perl apache2; do
	if [ -f "/usr/sbin/$s" ]; then
		all_servers="$s $all_servers"
	fi
done

get_debconf(){
	db_get sugarplum/deconfigure_httpd
	do_unconf="$RET"
}

deconfigure_httpd(){
	includefile="/etc/sugarplum/apache.conf"
	for s in $all_servers; do
		apacheconf="/etc/$s/httpd.conf"
		if [ -L /etc/$s/conf.d/sugarplum.conf ]; then
			rm -f /etc/$s/conf.d/sugarplum.conf
		fi
	done
}

case $1 in
	"remove")
		for s in $all_servers; do
			if [ -e "/etc/$s/conf.d/sugarplum.conf" ]; then
				need_ask=1	
			fi
		done
		if [ "$need_ask" ]; then
			db_input medium sugarplum/deconfigure_httpd || true
			db_go
			get_debconf
			if [ "$do_unconf" = "true" ]; then
				deconfigure_httpd
			fi
		fi
		;;
	*) ;;
esac