fix: skip scheduled updates for stopped LXC

This commit is contained in:
VAIO73
2026-10-16 17:21:34 +00:00
parent 3000c1cd66
commit c2ad35ca73
6 changed files with 163 additions and 3 deletions
+5
View File
@@ -163,6 +163,11 @@ fi
# 2) CT must be running for pct exec. Auto-start stopped CTs, then
# restore their original stopped state on every exit path.
STATE=$(pct status "$VMID" | awk '{print $2}')
if [[ "$STATE" != "running" && "${EXECUTION_MODE:-}" == "scheduled" ]]; then
[[ -n "${SCHEDULED_STOPPED_MARKER:-}" ]] && printf '%s\n' "$SCHEDULED_STOPPED_MARKER"
echo "SKIPPED: CT $VMID is stopped; a scheduled update will not start it."
exit 8
fi
STARTED_BY_PROXMENUX=0
OBSERVATION_ATTEMPTED=0
capture_before_stop() {