This file is indexed.

postrm is in phpmyadmin 4:3.4.10.1-1.

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 phpmyadmin

set -e

lighttpd_remove() {
	if [ -f /etc/lighttpd/conf-available/50-phpmyadmin.conf ] ; then
		rm -f /etc/lighttpd/conf-available/50-phpmyadmin.conf
		if which lighty-enable-mod >/dev/null 2>&1 ; then
			lighty-disable-mod phpmyadmin
			# We also enabled auth in postinst, but I think it's safer to keep it there
		else
			echo "Lighttpd not installed, skipping"
		fi
		# See bug #448682
		if [ -h /etc/lighttpd/conf-enabled/50-phpmyadmin.conf ] ; then
		    echo 'Manually deleting lighttpd/phpMyAdmin configuration link'
		    rm /etc/lighttpd/conf-enabled/50-phpmyadmin.conf
		fi
	fi
}

apache_remove() {
	if [ -d /etc/$webserver/conf.d ] && [ -L /etc/$webserver/conf.d/phpmyadmin.conf ]; then
		rm -f /etc/$webserver/conf.d/phpmyadmin.conf
	fi
}
if [ -f /usr/share/debconf/confmodule ]; then
    . /usr/share/debconf/confmodule
fi
if [ -f /usr/share/dbconfig-common/dpkg/postrm.mysql ]; then
    . /usr/share/dbconfig-common/dpkg/postrm.mysql
    if ! dbc_go phpmyadmin $@ ; then
        echo 'Automatic configuration using dbconfig-common failed!'
    fi
fi

if [ "$1" = "purge" ]; then
    rm -f /etc/phpmyadmin/config-db.php
    if which ucf >/dev/null 2>&1; then
	ucf --debconf-ok --purge /etc/phpmyadmin/config-db.php
    fi
fi

if [ "$1" = "remove" ] || [ "$1" = "purge" ]; then

	if [ -f /usr/share/debconf/confmodule ]; then
		db_version 2.0

		db_get phpmyadmin/reconfigure-webserver

		webservers="$RET"

		for webserver in $webservers; do
			webserver=${webserver%,}
			if [ "$webserver" = "lighttpd" ] ; then
				lighttpd_remove
			else
				apache_remove $webserver
			fi
			# Redirection of 3 is needed because Debconf uses it and it might 
			# be inherited by webserver. See bug #446324.
			if [ -f /etc/init.d/$webserver ] ; then
				if [ -x /usr/sbin/invoke-rc.d ]; then
					invoke-rc.d $webserver reload 3>/dev/null || true
				else
					/etc/init.d/$webserver reload 3>/dev/null || true
				fi
			fi
		done
	fi


	if [ "$1" = "purge" ]; then
        # Possibly installed desktop file
        if [ -h /usr/share/applications/phpmyadmin.desktop ] ; then
            rm -f /usr/share/applications/phpmyadmin.desktop
        fi
        if [ -h /etc/avahi/services/phpmyadmin.service ] ; then
            rm -f /etc/avahi/services/phpmyadmin.service
        fi
		rm -rf /etc/phpmyadmin /var/lib/phpmyadmin
	fi
fi


# Automatically added by dh_installdebconf
if [ "$1" = purge ] && [ -e /usr/share/debconf/confmodule ]; then
	. /usr/share/debconf/confmodule
	db_purge
fi
# End automatically added section


exit 0