#!/bin/sh

set -e

apache_install() 
{
	webserver=$1
	if [ -d /etc/$webserver/conf.d ] && [ ! -e /etc/$webserver/conf.d/adminer.conf ]; then
		ln -s ../../adminer/apache.conf /etc/$webserver/conf.d/adminer.conf
	fi
}

apache_install apache2

if [ -f /etc/init.d/apache2 ] ; then
    if [ -x /usr/sbin/invoke-rc.d ]; then
	invoke-rc.d apache2 force-reload >/dev/null 2>&1 || true
    else
	/etc/init.d/apache2 force-reload >/dev/null 2>&1 || true
    fi
fi

#DEBHELPER#

exit 0
