postrm is in ampache 3.6-rzb2779+dfsg-0ubuntu9.
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 | #!/bin/sh
set -e
. /usr/share/debconf/confmodule
if [ "$1" = "remove" ] || [ "$1" = "purge" ]; then
#restart web server if users answer is yes.
db_get ampache/restart_webserver || true
re_start="$RET"
if [ "$re_start" = "false" ]; then
printf "postrm: Please restart the web server manually.\n"
elif [ "$re_start" = "true" ]; then
if [ -e /usr/share/apache2/apache2-maintscript-helper ] ; then
. /usr/share/apache2/apache2-maintscript-helper
apache2_invoke disconf ampache.conf || exit $?
fi
else
printf "postrm: unable to de-configure ampache, please do so manually.\n"
fi
fi
if [ "$1" = "purge" ]; then
if [ -e /usr/bin/ucf ]; then
ucf --debconf-ok --purge /etc/ampache/ampache.conf
ucfr --force --purge ampache /etc/ampache/ampache.conf
fi
#Take out the trash, remove old files/symlinks if they exist.
if [ -e /etc/apache2/conf.d/ampache.conf ]; then
rm -f /etc/apache2/conf.d/ampache.conf
else
printf "postrm: /etc/apache2/conf.d/ampache.conf not present, nothing to do\n"
fi
if [ -e /etc/apache2/conf.d/ampache1.conf ]; then
rm -f /etc/apache2/conf.d/ampache.conf
else
printf "postrm: /etc/apache2/conf.d/ampache1.conf not present, nothing to do\n"
fi
if [ -e /etc/apache2/sites-enabled/ApacheAmpache ]; then
rm -f /etc/apache2/sites-available/ApacheAmpache
else
printf "postrm: /etc/apache2/sites-enabled/ApacheAmpache not present, nothing to do\n"
fi
if [ -e /etc/apache2/sites-enabled/ampvhadd ]; then
rm -f /etc/apache2/sites-available/ampvhadd
else
printf "postrm: /etc/apache2/sites-enabled/ampvhadd not present, nothing to do\n"
fi
fi
# Automatically added by dh_installdeb
dpkg-maintscript-helper rm_conffile /etc/cron.daily/ampache 3.6-git408e713+dfsg-3.1 ampache -- "$@"
# End automatically added section
# Automatically added by dh_installdeb
dpkg-maintscript-helper rm_conffile /etc/logrotate.d/ampache 3.6-git408e713+dfsg-3.1 ampache -- "$@"
# End automatically added section
# 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
# Automatically added by dh_apache2
if [ "$1" = "purge" ] ; then
if true; then
if [ -e /usr/share/apache2/apache2-maintscript-helper ] ; then
. /usr/share/apache2/apache2-maintscript-helper
for conf in ampache ; do
apache2_invoke disconf $conf || exit $?
done
fi
fi
fi
# End automatically added section
exit 0
|