This file is indexed.

postrm is in gosa 2.7.4+reloaded3-3.

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
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
#! /bin/sh
# postrm script for GOsa
#

set -e

PATH="/usr/bin:/usr/sbin:/bin:/sbin"
export PATH

case "$1" in
	purge)
		if [ -d /var/spool/gosa ] ; then
			echo "Removing /var/spool/gosa as requested."
			rm -Rf /var/spool/gosa
		fi
		if [ -d /var/cache/gosa ] ; then
			echo "Removing /var/cache/gosa as requested."
			rm -Rf /var/cache/gosa
		fi

		if [ -e /etc/gosa/gosa.secrets ]; then rm /etc/gosa/gosa.secrets; fi
		if [ -e /usr/share/gosa/html/themes/default/images/img.png ]; then rm /usr/share/gosa/html/themes/default/images/img.png; fi
		if [ -e /usr/share/gosa/ihtml/themes/default/img.styles ]; then rm /usr/share/gosa/ihtml/themes/default/img.styles; fi
		if [ -d /usr/share/gosa ]; then find /usr/share/gosa -depth -type d -empty -exec rmdir "{}" \;; fi
		rmdir --ignore-fail-on-non-empty /etc/gosa/
	;;

	remove|purge)
		if [ -d /etc/apache2/conf.d ]; then
			# Remove GOsa include
			if [ -L /etc/apache2/conf.d/gosa.conf ]; then
				rm -f /etc/apache2/conf.d/gosa.conf
			fi

			# Restart servers
			if [ -x "$(which apache2)" ]; then
				if [ -x "$(which invoke-rc.d)" ]; then
					invoke-rc.d apache2 restart
				else
					/etc/init.d/apache2 restart
				fi
			fi
		fi

		if [ -d /etc/apache2/conf-available ] ; then
			if [ -e /usr/share/apache2/apache2-maintscript-helper ] ; then
				. /usr/share/apache2/apache2-maintscript-helper
				apache2_invoke disconf gosa
			elif [ -L /etc/apache2/conf-enabled/gosa.conf ]; then
				rm -f /etc/apache2/conf-enabled/gosa.conf
			fi

			if [ -L /etc/apache2/conf-available/gosa.conf ]; then
				rm -f /etc/apache2/conf-available/gosa.conf
			fi

			# Finally restart servers
			if [ -x "$(which apache2)" ]; then
				if [ -x "$(which invoke-rc.d)" ]; then
					invoke-rc.d apache2 reload
				else
					/etc/init.d/apache2 reload
				fi
			fi
		fi

		if [ -d /etc/lighttpd/conf-available ]; then
			# Remove GOsa include
			if [ -L /etc/lighttpd/conf-enabled/99gosa-lighttpd.conf ]; then
				rm -f /etc/lighttpd/conf-enabled/99gosa-lighttpd.conf
			fi

			# Restart servers
			if [ -x "$(which lighttpd)" ]; then
				if [ -x "$(which invoke-rc.d)" ]; then
					invoke-rc.d lighttpd restart
				else
					/etc/init.d/lighttpd restart
				fi
			fi
		fi
	;;

	upgrade|failed-upgrade|abort-install|abort-upgrade|disappear)
	;;

	*)
		echo "postrm called with unknown argument \`$1'" >&2
		exit 0
	;;
esac



exit 0