2015-02-28 12:42:20 +01:00

43 lines
1002 B
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)
;;
*)
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