#!/bin/sh

VERBOSE_INSTALL=yes

if [ -f /etc/debian_version ] ; then
	. /usr/share/dtc/admin/install/debian_config
	. /usr/share/dtc/admin/install/functions

	. ${DTC_SAVED_INSTALL_CONFIG}
	if [ ""$conf_apache_version = "2" ] ; then
		PATH_HTTPD_CONF=/etc/apache2/apache2.conf
	else
		PATH_HTTPD_CONF=/etc/apache/httpd.conf
	fi

	PATH_HTTPD_CONF=/etc/apache2/apache2.conf
	DTCuninstallDaemons
	PATH_HTTPD_CONF=/etc/apache/httpd.conf
	uninstallHttpdConfig
fi

RPM=""
set +e
RPM=`which rpm`
set -e

if [ -x "$RPM" ] ; then
	if rpm -q coreutils >/dev/null ; then
		# Prepare this
		. /usr/share/dtc/admin/install/redhat_config
		. /usr/share/dtc/admin/install/functions
		. ${DTC_SAVED_INSTALL_CONFIG}
		# Then call the uninstaller!
		DTCuninstallDaemons
	fi
fi

if [ "`uname -s`" = "FreeBSD" ]; then
	. /usr/local/www/dtc/admin/install/bsd_config
	. /usr/local/www/dtc/admin/install/functions
	. ${DTC_SAVED_INSTALL_CONFIG}
	deleteGeneratedFiles
	DTCuninstallDaemons
	uninstallHttpdConfig
fi
