postrm is in roundcube-core 0.7.2-9+deb7u2.
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 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 | #!/bin/sh
# postrm script for roundcube
#
# see: dh_installdeb(1)
set -e
if [ -f /usr/share/debconf/confmodule ]; then
. /usr/share/debconf/confmodule
fi
if [ -f /usr/share/dbconfig-common/dpkg/postrm ]; then
. /usr/share/dbconfig-common/dpkg/postrm
dbc_go roundcube $@
fi
lighttpd_remove() {
if [ -f /etc/lighttpd/conf-available/50-roundcube.conf ] ; then
rm -f /etc/lighttpd/conf-available/50-roundcube.conf
if [ ! -x /usr/sbin/lighty-disable-mod ] ; then
echo "Lighttpd not installed, skipping"
else
lighty-disable-mod roundcube
fi
# See bug #448682
if [ -h /etc/lighttpd/conf-enabled/50-roundcube.conf ] ; then
echo 'Manually deleting lighttpd/roundcube configuration link'
rm /etc/lighttpd/conf-enabled/50-roundcube.conf
fi
fi
}
apache_remove() {
if [ -d /etc/$webserver/conf.d ] && [ -L /etc/$webserver/conf.d/roundcube ]; then
rm -f /etc/$webserver/conf.d/roundcube
fi
}
case "$1" in
upgrade|failed-upgrade|abort-install|abort-upgrade|disappear)
;;
remove)
# Handling web server reconfiguration
db_get roundcube/reconfigure-webserver
webservers="$RET"
restart=""
for webserver in $webservers; do
webserver=${webserver%,}
case "$webserver" in
apache*)
apache_remove $webserver
;;
lighttpd)
lighttpd_remove
;;
*)
echo "Unknown webserver $webserver"
;;
esac
test -x /usr/sbin/$webserver || continue
restart="$restart $webserver"
done
db_get roundcube/restart-webserver
res="$RET"
db_stop || true
if [ "$res" = "true" ]; then
for webserver in $restart; do
webserver=${webserver%,}
# Redirection of 3 is needed because Debconf uses it and it might
# be inherited by webserver. See bug #446324.
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
done
fi
;;
purge)
rm -f /etc/roundcube/debian-db.php
if which ucf >/dev/null 2>&1; then
ucf --purge /etc/roundcube/debian-db.php
ucf --purge /etc/roundcube/main.inc.php
fi
rm -f /etc/roundcube/main.inc.php
rm -rf /var/log/roundcube
rm -rf /var/lib/roundcube
;;
*)
echo "postrm called with unknown argument \`$1'" >&2
exit 1
;;
esac
# 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
|