]> git.proxmox.com Git - pve-ha-manager.git/blame - debian/postinst
Fix postinstall script not removing watchdog-mux.socket
[pve-ha-manager.git] / debian / postinst
CommitLineData
f8a3fc80
TL
1#!/bin/bash
2
3# Abort if any command returns an error value
4set -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.
17db_stop
18
19case "$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
ecc145c9 29 if [ -L /etc/systemd/system/sockets.target.wants/watchdog-mux.socket ]; then
b3395c8a
DM
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
f8a3fc80
TL
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
47esac
48
8d357f30
DM
49# dh_installdeb will replace this with shell code automatically
50# generated by other debhelper scripts.
51
52#DEBHELPER#
f8a3fc80
TL
53
54exit 0