]> git.proxmox.com Git - pve-ha-manager.git/commitdiff
d/postinst: make deb-systemd-invoke non-fatal
authorFabian Grünbichler <f.gruenbichler@proxmox.com>
Thu, 11 Apr 2024 10:10:44 +0000 (12:10 +0200)
committerThomas Lamprecht <t.lamprecht@proxmox.com>
Wed, 17 Apr 2024 14:56:02 +0000 (16:56 +0200)
else this can break an upgrade for unrelated reasons.

this also mimics debhelper behaviour more (which we only not use here because
of lack of reload support) - restructured the snippet to be more similar with
an explicit `if` as well.

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
debian/pve-ha-manager.postinst

index 94ab797a7e379148d241caaaede532b0b9dbdf1d..5c8f0cdbb38b838889f09d5b2fede7f477205485 100644 (file)
@@ -5,11 +5,13 @@ 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
+    if systemctl --quiet is-active pve-ha-lrm.service; then
+      deb-systemd-invoke reload-or-try-restart pve-ha-lrm.service || true
+    fi
 
-    systemctl --quiet is-active pve-ha-crm.service &&
-      deb-systemd-invoke reload-or-try-restart pve-ha-crm.service
+    if systemctl --quiet is-active pve-ha-crm.service; then
+      deb-systemd-invoke reload-or-try-restart pve-ha-crm.service || true
+    fi
 fi
 
 exit 0