#!/bin/sh -e

case "$1" in
    purge|remove)
	if [ -e /usr/share/masterkey-gui-default/config.masterkey ]; then
	    rm -f /usr/share/masterkey-gui-default/config.masterkey
	fi
        WEBSERVERS="apache apache-ssl apache2"
        for apache in $WEBSERVERS; do
	    for conf in masterkey-gui-default-apache-directory.conf; do
	      if [ -L "/etc/$apache/conf.d/$conf" ]; then
		  echo "Removing masterkey-gui-default $conf file for $apache.."
		  rm -f /etc/$apache/conf.d/$conf
	      fi
	    done
	    if [ -f "/var/run/$apache.pid" ]; then
		invoke-rc.d $apache reload
	    fi
        done
        ;;
    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.



exit 0

