#! /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 # same as dh_systemd_enable (code copied) systemctl --system daemon-reload >/dev/null || true PVESERVICES="pvedaemon pveproxy spiceproxy pvestatd pvebanner pvenetcommit pve-guests" PVETIMERS="pvesr" if [ "$1" = "remove" ]; then for timer in ${PVETIMERS}; do if [ -x "/usr/bin/deb-systemd-helper" ]; then deb-systemd-helper mask $timer.timer >/dev/null fi done for service in ${PVESERVICES}; do if [ -x "/usr/bin/deb-systemd-helper" ]; then deb-systemd-helper mask $service.service >/dev/null fi done fi if [ "$1" = purge ]; then for timer in ${PVETIMERS}; do if [ -x "/usr/bin/deb-systemd-helper" ]; then deb-systemd-helper purge $timer.timer >/dev/null deb-systemd-helper unmask $timer.timer >/dev/null fi done for service in ${PVESERVICES}; do if [ -x "/usr/bin/deb-systemd-helper" ]; then deb-systemd-helper purge $service.service >/dev/null deb-systemd-helper unmask $service.service >/dev/null fi done fi