#!/bin/sh

set -e

CONFFILE="/etc/beszel/hub.conf"

case "${1}" in
	purge)
		rm -f "${CONFFILE}"
		rmdir --ignore-fail-on-non-empty -p "${CONFFILE}.d" > /dev/null 2>&1 || true

		rm -rf /var/lib/beszel-hub
		;;

	remove|upgrade|failed-upgrade|abort-install|abort-upgrade|disappear)

		;;

	*)
		echo "postrm called with unknown argument \`${1}'" >&2
		exit 1
		;;
esac

#DEBHELPER#

exit 0
