#!/bin/sh
#
#

set -e

case "$1" in
    remove)
	# Nothing to do
	;;

    purge)
	# Remove database
	rm -f /var/lib/dhcp/dhcpd.leases /var/lib/dhcp/dhcpd.leases~

	# Remove database directory
	if [ -d /var/lib/dhcp ]; then
	    rmdir --ignore-fail-on-non-empty /var/lib/dhcp/
	fi

	# Remove init.d configuration file
	rm -f /etc/default/isc-dhcp-server
	;;

    upgrade|failed-upgrade|abort-install|abort-upgrade|disappear)
	# Nothing to do
	;;
esac

init_script_error_handler()
{
	return 0
}

#DEBHELPER#

exit 0
