#! /bin/sh

set -e

case "$1" in
	remove)
		;;
	purge)
		if dpkg-statoverride --list | grep -qw /etc/freeradius/dictionary$; then
			dpkg-statoverride --remove /etc/freeradius/dictionary
		fi

		if dpkg-statoverride --list | grep -qw /etc/freeradius/radiusd.conf$; then
			dpkg-statoverride --remove /etc/freeradius/radiusd.conf
		fi

		if dpkg-statoverride --list | grep -qw /etc/freeradius$; then
			dpkg-statoverride --remove /etc/freeradius
		fi

		rmdir --ignore-fail-on-non-empty /etc/freeradius
		;;
	*)
		;;
esac

#DEBHELPER#

exit 0

