#!/bin/sh -e

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

#DEBHELPER#

exit 0

