#!/bin/sh
# postrm script for adminer

set -e

apache_remove() 
{
	if [ -d /etc/apache2/conf.d ] && [ -L /etc/apache2/conf.d/adminer.conf ]; then
		rm -f /etc/apache2/conf.d/adminer.conf
	fi
}

if [ "$1" = "remove" ] || [ "$1" = "purge" ]; then
	apache_remove 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
fi

#DEBHELPER#

exit 0
