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

set -e

PACKAGE="phpqladmin"
VERSION="2.0.13-1"

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

# Package maintainer's commands follow:
if [ "$1" = "configure" ]; 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

    . /usr/share/wwwconfig-common/php.get

    for server in $webservers; do
	 if [ "$phpver" = "php4" ]; then
	     extension=".php"
            typestr="application/x-httpd-php"
            . /usr/share/wwwconfig-common/apache-addtype_all.sh
	     [ "$status" = "uncommented" -o "$status" = "added" -o "$status" = "lineadded" ] && restart="$server $restart"
	 fi

        . /usr/share/wwwconfig-common/apache-php.sh
	 [ "$status" = "uncomment" ] && restart="$server $restart"

	 includefile=/etc/phpqladmin/apache.conf
	 . /usr/share/wwwconfig-common/apache-include_all.sh
	 [ "$status" = "uncomment" -o "$status" = "include" ] && restart="$server $restart"

	 index=index.php
	 . /usr/share/wwwconfig-common/apache-index_all.sh
	 [ "$status" = "added" ] && restart="$server $restart"
    done

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

db_stop

exit 0
