#!/bin/sh -e

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

