#!/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 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/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/magps/* rm -rf /var/cache/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. #DEBHELPER# exit 0