Apache/2.4.7 (Ubuntu) Linux sman1baleendah 3.13.0-24-generic #46-Ubuntu SMP Thu Apr 10 19:11:08 UTC 2014 x86_64 uid=33(www-data) gid=33(www-data) groups=33(www-data) safemode : OFF MySQL: ON | Perl: ON | cURL: OFF | WGet: ON > / var / lib / dpkg / info / | server ip : 104.21.89.46 your ip : 172.70.80.62 H O M E |
Filename | /var/lib/dpkg/info/phpmyadmin.postrm |
Size | 2.87 kb |
Permission | rwxr-xr-x |
Owner | root : root |
Create time | 27-Apr-2025 10:12 |
Last modified | 30-Aug-2018 03:25 |
Last accessed | 06-Jul-2025 22:14 |
Actions | edit | rename | delete | download (gzip) |
View | text | code | image |
#!/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() {
COMMON_STATE=$(dpkg-query -f '${Status}' -W 'apache2.2-common' 2>/dev/null | awk '{print $3}' || true)
if [ -e /usr/share/apache2/apache2-maintscript-helper ] ; then
. /usr/share/apache2/apache2-maintscript-helper
apache2_invoke disconf phpmyadmin
elif [ "$COMMON_STATE" = "installed" ] || [ "$COMMON_STATE" = "unpacked" ] ; then
rm -f /etc/apache2/conf.d/phpmyadmin.conf
fi
rm -f /etc/$webserver/conf-available/phpmyadmin.conf
}
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 $1
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
# 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() {
COMMON_STATE=$(dpkg-query -f '${Status}' -W 'apache2.2-common' 2>/dev/null | awk '{print $3}' || true)
if [ -e /usr/share/apache2/apache2-maintscript-helper ] ; then
. /usr/share/apache2/apache2-maintscript-helper
apache2_invoke disconf phpmyadmin
elif [ "$COMMON_STATE" = "installed" ] || [ "$COMMON_STATE" = "unpacked" ] ; then
rm -f /etc/apache2/conf.d/phpmyadmin.conf
fi
rm -f /etc/$webserver/conf-available/phpmyadmin.conf
}
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 $1
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