diff --git a/updater.sh b/updater.sh index ea9de69..36cb6bb 100644 --- a/updater.sh +++ b/updater.sh @@ -812,12 +812,9 @@ log "Host Update: $HOST_OK" log "Host Reboot nötig: $HOST_REBOOT_REQUIRED" log "============================================================" -if [[ -z "$ONLY_CT" \ - && -z "$ONLY_VM" \ - && "$MODE" == "update" ]] -then +if [[ "$MODE" == "update" ]]; then if (( ERRORS > 0 )); then - if [[ "$HOST_REBOOT_REQUIRED" == "yes" ]]; then + if [[ -z "$ONLY_CT" && -z "$ONLY_VM" && "$HOST_REBOOT_REQUIRED" == "yes" ]]; then log "" log "Host-Neustart erforderlich, aber automatischer Neustart wird NICHT ausgeführt." log "Grund: $ERRORS Fehler im Update-Lauf." @@ -829,6 +826,11 @@ then log "Grund: $ERRORS Fehler im Update-Lauf." fi + elif [[ -n "$ONLY_CT" || -n "$ONLY_VM" ]]; then + # Gezielter Gast-Lauf: Der Proxmox-Host wurde nicht aktualisiert. + # Deshalb notwendige Gast-Neustarts direkt am Ende ausführen. + reboot_pending_guests + elif [[ "$HOST_OK" == "yes" \ && "$HOST_REBOOT_REQUIRED" == "yes" \ && "$AUTO_REBOOT_HOST" == "yes" \