]> git.proxmox.com Git - pve-manager.git/blob - debian/postrm
depend on systemd, add service files
[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 ;;
14
15 *)
16 echo "postrm called with unknown argument \`$1'" >&2
17 exit 1
18 ;;
19 esac
20
21 # same as dh_systemd_enable (code copied)
22 systemctl --system daemon-reload >/dev/null || true
23
24 PVESERVICES="pvedaemon pveproxy spiceproxy pvestatd pvebanner pvenetcommit pve-manager"
25 if [ "$1" = "remove" ]; then
26 for service in ${PVESERVICES}; do
27 echo "REMOVETEST $service";
28 if [ -x "/usr/bin/deb-systemd-helper" ]; then
29 deb-systemd-helper mask $service.service >/dev/null
30 fi
31 done
32 fi
33
34 if [ "$1" = purge ]; then
35 for service in ${PVESERVICES}; do
36 echo "PURGETEST $service";
37 if [ -x "/usr/bin/deb-systemd-helper" ]; then
38 deb-systemd-helper purge $service.service >/dev/null
39 deb-systemd-helper unmask $service.service >/dev/null
40 fi
41 done
42 fi