]> git.proxmox.com Git - pve-ha-manager.git/blob - debian/postinst
Fix postinstall script not removing watchdog-mux.socket
[pve-ha-manager.git] / debian / postinst
1 #!/bin/bash
2
3 # Abort if any command returns an error value
4 set -e
5
6 # This script is called as the last step of the installation of the
7 # package. All the package's files are in place, dpkg has already
8 # done its automatic conffile handling, and all the packages we depend
9 # of are already fully installed and configured.
10
11 # The following idempotent stuff doesn't generally need protecting
12 # against being run in the abort-* cases.
13
14 # Use debconf. (installs templates)
15 . /usr/share/debconf/confmodule
16 # all done with debconf here.
17 db_stop
18
19 case "$1" in
20 triggered)
21 # We don't print a status message here, as dpkg already said
22 # "Processing triggers for ...".
23 exit 0;;
24
25 configure)
26
27 # remove the systemd watchdog mux socket service
28 # as watchdog-mux should handle this on it's own
29 if [ -L /etc/systemd/system/sockets.target.wants/watchdog-mux.socket ]; then
30 rm -f /etc/systemd/system/sockets.target.wants/watchdog-mux.socket
31 rm -f /var/lib/systemd/deb-systemd-helper-enabled/sockets.target.wants/watchdog-mux.socket
32 rm -f /var/lib/systemd/deb-systemd-helper-enabled/watchdog-mux.socket.dsh-also
33 systemctl daemon-reload
34 fi
35
36 ;;
37
38 abort-upgrade|abort-remove|abort-deconfigure)
39 exit 0
40 ;;
41
42 *)
43 echo "postinst called with unknown argument \`$1'" >&2
44 exit 1
45 ;;
46
47 esac
48
49 # dh_installdeb will replace this with shell code automatically
50 # generated by other debhelper scripts.
51
52 #DEBHELPER#
53
54 exit 0