#!/bin/sh # postrm script for nagvis # # see: dh_installdeb(1) set -e # summary of how this script can be called: # * `remove' # * `purge' # * `upgrade' # * `failed-upgrade' # * `abort-install' # * `abort-install' # * `abort-upgrade' # * `disappear' # # for details, see http://www.debian.org/doc/debian-policy/ or # the debian-policy package # Apache2 if [ -e /usr/share/apache2/apache2-maintscript-helper ] ; then . /usr/share/apache2/apache2-maintscript-helper apache2_invoke disconf nagvis fi if [ -L /etc/apache2/conf.d/nagvis.conf ]; then # remove link to config rm -f /etc/apache2/conf.d/nagvis.conf # reload webserver [ -x $(which invoke-rc.d) ] && invoke-rc.d apache2 reload || true fi case "$1" in purge) ## remove apache part of the configuration and nagvis' ini file ## (both generetaded in postinst) for conf_file in /etc/apache2/conf.d/nagvis.conf /etc/nagvis/apache2.conf /etc/nagvis/nagvis.ini.php ; do rm -f "$conf_file" if which ucf >/dev/null; then ucf --purge "$conf_file" fi if which ucfr >/dev/null; then ucfr --purge nagvis "$conf_file" fi done ## these files are generated by user interaction, ask if they should be removed delete_on_purge="false" if [ -f /usr/share/debconf/confmodule ]; then . /usr/share/debconf/confmodule db_input high nagvis/delete_on_purge || true db_go || true db_get nagvis/delete_on_purge || true delete_on_purge="$RET" fi if [ "$delete_on_purge" = "true" ]; then rm -f /etc/nagvis/auth.db rm -rf /etc/nagvis/automaps/* rm -rf /etc/nagvis/maps/* rm -rf /etc/nagvis/profiles/* rm -rf /var/cache/nagvis/* rm -rf /var/lib/nagvis/* fi ;; remove|upgrade|failed-upgrade|abort-install|abort-upgrade|disappear) ;; *) echo "postrm called with unknown argument \`$1'" >&2 exit 1 ;; esac # dh_installdeb will replace this with shell code automatically # generated by other debhelper scripts. # Automatically added by dh_installdeb/13.11.9 dpkg-maintscript-helper symlink_to_dir /usr/share/nagvis/share/server/core/ext/php-gettext-1.0.12 ../../../../../php/php-php-gettext 1:1.9.25-2\~ -- "$@" # End automatically added section # Automatically added by dh_installdebconf/13.11.9 if [ "$1" = purge ] && [ -e /usr/share/debconf/confmodule ]; then . /usr/share/debconf/confmodule db_purge fi # End automatically added section exit 0