GNAI-025: Fluxer-Chat-LXC CT 117 — komplett in Betrieb (fluxer.ghostnet.selfhost.eu) #21

Merged
spektr merged 72 commits from lxc/ct-117-gnai-025-fluxer-chat into main 2026-11-30 04:49:27 +01:00
Showing only changes of commit 86a4af3caf - Show all commits
@@ -64,15 +64,17 @@ storage_is_active() {
storage_has_free() {
local storage="$1"
local required_gib="$2"
# Note: awk `exit` still runs the END block, so the verdict must be
# decided there via flags (same pattern as storage_is_active).
pvesm status | awk -v storage="$storage" -v required="$required_gib" '
$1 == storage && $3 == "active" {
avail_kib = $6
if (avail_kib ~ /^[0-9]+$/) {
exit(avail_kib / 1048576 >= required ? 0 : 1)
found = 1
ok = (avail_kib / 1048576 >= required)
}
exit 1
}
END { exit 1 }
END { exit(found && ok ? 0 : 1) }
'
}