#! /bin/bash
# This maintainer script was generated by yada

set -e

PACKAGE="phpqladmin"
VERSION="2.1.1-1"

. /usr/share/debconf/confmodule
db_version 2.0 || [ $? -lt 30 ]

# Package maintainer's commands follow:
if [ -f /usr/share/wwwconfig-common/apache-uninclude_all.sh ]; then
    db_get "phpqladmin/webserver"
    webserver="$RET"
    case "$webserver" in
        Apache)		webservers="apache";;
        Apache-SSL)	webservers="apache-ssl";;
        Both)		webservers="apache apache-ssl";;
        *)		webservers="";;
    esac
    includefile=/etc/phpqladmin/apache.conf

    if [ "$1" = "purge" ]; then
        for server in $webservers; do
            . /usr/share/wwwconfig-common/apache-uninclude_all.sh
	     if [ "$status" = "purge" ]; then
	         restart="$restart $server"
	     fi
        done
        test -d /etc/phpqladmin && rm -rf /etc/phpqladmin
    fi

    if [ "$1" = "remove" ]; then
        for server in $webservers; do
            . /usr/share/wwwconfig-common/apache-cominclude_all.sh
	     if [ "$status" = "comment" ]; then
	         restart="$restart $server"
	     fi
        done
    fi

    servers="apache-ssl apache"
    . /usr/share/wwwconfig-common/restart.sh
fi
# End of package maintainer's commands

#DEBHELPER#

db_stop
exit 0
