From 20274ba1f14bffd1313391f21d9337ebd12e0fbc Mon Sep 17 00:00:00 2001 From: humocs-man <1+humocs-man@noreply.localhost> Date: Sun, 5 Jul 2026 13:39:26 +0000 Subject: [PATCH] scripts/notify-bootc-user.sh aktualisiert --- scripts/notify-bootc-user.sh | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/scripts/notify-bootc-user.sh b/scripts/notify-bootc-user.sh index 32b1780..cc599a9 100755 --- a/scripts/notify-bootc-user.sh +++ b/scripts/notify-bootc-user.sh @@ -25,9 +25,11 @@ $BOOTC upgrade || true # ============================================================================= # 2. Pruefen ob ein gestagtes Deployment vorhanden ist # ============================================================================= -# jq -e gibt Exit-Code 1 zurueck wenn das Ergebnis null/false/0/leer ist. -if ! $BOOTC status --json | jq -e '.status.staged != null' > /dev/null 2>&1; then - $LOGGER -t "$TAG" "Kein gestagtes Deployment gefunden (System aktuell oder bereits angewendet)." +# Liest exakt den Wert von 'staged' aus dem JSON als Text aus +STAGED_STATUS=$(bootc status --json | jq -c '.status.staged') + +# Wenn der Wert exakt "null" ist (oder leer, falls der Befehl fehlschlägt), brich ab +if [ "$STAGED_STATUS" == "null" ] || [ -z "$STAGED_STATUS" ]; then exit 0 fi