]> git.proxmox.com Git - pve-manager.git/blame - debian/postrm
adapt the health message list to luminous
[pve-manager.git] / debian / postrm
CommitLineData
aff192e6
DM
1#! /bin/sh
2
3# Abort if any command returns an error value
4set -e
5
6675a064
DM
6case "$1" in
7 purge)
8 rm -rf /var/log/pveproxy
9 rm -rf /var/lib/pve-manager
10 ;;
11
12 remove|upgrade|failed-upgrade|abort-install|abort-upgrade|disappear)
16c0fc61 13 rm -f /etc/cron.d/pveupdate
6675a064
DM
14 ;;
15
16 *)
17 echo "postrm called with unknown argument \`$1'" >&2
18 exit 1
19 ;;
20esac
21
22# same as dh_systemd_enable (code copied)
23systemctl --system daemon-reload >/dev/null || true
aff192e6 24
6675a064 25PVESERVICES="pvedaemon pveproxy spiceproxy pvestatd pvebanner pvenetcommit pve-manager"
0dfd4a94
WL
26PVETIMERS="pvesr"
27
6675a064 28if [ "$1" = "remove" ]; then
0dfd4a94
WL
29 for timer in ${PVETIMERS}; do
30 if [ -x "/usr/bin/deb-systemd-helper" ]; then
31 deb-systemd-helper mask $timer.timer >/dev/null
32 fi
33 done
6675a064 34 for service in ${PVESERVICES}; do
6675a064
DM
35 if [ -x "/usr/bin/deb-systemd-helper" ]; then
36 deb-systemd-helper mask $service.service >/dev/null
37 fi
38 done
39fi
40
41if [ "$1" = purge ]; then
0dfd4a94
WL
42 for timer in ${PVETIMERS}; do
43 if [ -x "/usr/bin/deb-systemd-helper" ]; then
44 deb-systemd-helper purge $timer.timer >/dev/null
45 deb-systemd-helper unmask $timer.timer >/dev/null
46 fi
47 done
6675a064 48 for service in ${PVESERVICES}; do
6675a064
DM
49 if [ -x "/usr/bin/deb-systemd-helper" ]; then
50 deb-systemd-helper purge $service.service >/dev/null
51 deb-systemd-helper unmask $service.service >/dev/null
52 fi
53 done
aff192e6 54fi