]> git.proxmox.com Git - pve-ha-manager.git/commitdiff
d/postinst: fix restarting LRM/CRM when triggered
authorThomas Lamprecht <t.lamprecht@proxmox.com>
Mon, 17 Jan 2022 10:30:46 +0000 (11:30 +0100)
committerThomas Lamprecht <t.lamprecht@proxmox.com>
Mon, 17 Jan 2022 10:30:49 +0000 (11:30 +0100)
We wrongly dropped the semi-manual postinst in favor of a fully
auto-generated one, but we always need to generate the trigger
actions ourself - cannot work otherwise.

Fix 3166752 ("postinst: use auto generated postinst")
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
debian/lintian-overrides
debian/pve-ha-manager.postinst [new file with mode: 0644]

index 142fdffbacccfd98a7bf8edaae8005cc9bde0ad6..a5a0fe652987bc548a4b01ad67363629933a4b9d 100644 (file)
@@ -1 +1,2 @@
 pve-ha-manager: repeated-trigger-name pve-api-updates (lines 1 2)
+pve-ha-manager: maintainer-script-calls-systemctl postinst
diff --git a/debian/pve-ha-manager.postinst b/debian/pve-ha-manager.postinst
new file mode 100644 (file)
index 0000000..94ab797
--- /dev/null
@@ -0,0 +1,15 @@
+#!/bin/sh
+
+set -e
+
+#DEBHELPER#
+
+if [ "$1" = "triggered" ]; then
+    systemctl --quiet is-active pve-ha-lrm.service &&
+      deb-systemd-invoke reload-or-try-restart pve-ha-lrm.service
+
+    systemctl --quiet is-active pve-ha-crm.service &&
+      deb-systemd-invoke reload-or-try-restart pve-ha-crm.service
+fi
+
+exit 0