2015-09-06 10:37:19 +02:00

44 lines
1.0 KiB
Bash
Executable File

#! /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-manager"
if [ "$1" = "remove" ]; then
for service in ${PVESERVICES}; do
echo "REMOVETEST $service";
if [ -x "/usr/bin/deb-systemd-helper" ]; then
deb-systemd-helper mask $service.service >/dev/null
fi
done
fi
if [ "$1" = purge ]; then
for service in ${PVESERVICES}; do
echo "PURGETEST $service";
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