#! /bin/sh

# Abort if any command returns an error value
set -e

case "$1" in
    purge)
	rm -rf /var/log/pveproxy
	rm -rf /var/lib/pve-manager
    ;;

    remove|upgrade|failed-upgrade|abort-install|abort-upgrade|disappear)
	rm -f /etc/cron.d/pveupdate
    ;;

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

# Automatically added by dh_installsystemd/13.11.4
if [ "$1" = remove ] && [ -d /run/systemd/system ] ; then
	systemctl --system daemon-reload >/dev/null || true
fi
# End automatically added section
# Automatically added by dh_installsystemd/13.11.4
if [ "$1" = "purge" ]; then
	if [ -x "/usr/bin/deb-systemd-helper" ]; then
		deb-systemd-helper purge 'pve-daily-update.timer' 'pve-firewall-commit.service' 'pve-guests.service' 'pve-sdn-commit.service' 'pvebanner.service' 'pvedaemon.service' 'pvenetcommit.service' 'pveproxy.service' 'pvescheduler.service' 'pvestatd.service' 'spiceproxy.service' >/dev/null || true
	fi
fi
# End automatically added section

