]> git.proxmox.com Git - pve-manager.git/blob - debian/postrm
simply remove /etc/cron.d/pveupdate in postint
[pve-manager.git] / debian / postrm
1 #! /bin/sh
2
3 # Abort if any command returns an error value
4 set -e
5
6 case "$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)
13 rm -f /etc/cron.d/pveupdate
14 ;;
15
16 *)
17 echo "postrm called with unknown argument \`$1'" >&2
18 exit 1
19 ;;
20 esac
21
22 # same as dh_systemd_enable (code copied)
23 systemctl --system daemon-reload >/dev/null || true
24
25 PVESERVICES="pvedaemon pveproxy spiceproxy pvestatd pvebanner pvenetcommit pve-manager"
26 if [ "$1" = "remove" ]; then
27 for service in ${PVESERVICES}; do
28 echo "REMOVETEST $service";
29 if [ -x "/usr/bin/deb-systemd-helper" ]; then
30 deb-systemd-helper mask $service.service >/dev/null
31 fi
32 done
33 fi
34
35 if [ "$1" = purge ]; then
36 for service in ${PVESERVICES}; do
37 echo "PURGETEST $service";
38 if [ -x "/usr/bin/deb-systemd-helper" ]; then
39 deb-systemd-helper purge $service.service >/dev/null
40 deb-systemd-helper unmask $service.service >/dev/null
41 fi
42 done
43 fi