fix: detect vault initialized state correctly

This commit is contained in:
Brad Stein 2026-01-14 01:42:28 -03:00
parent cb5796cb71
commit 50aec198a4

View File

@ -9,12 +9,12 @@ if [ -z "${status_json}" ]; then
exit 1
fi
if ! printf '%s' "${status_json}" | grep -q '"initialized":true'; then
if ! printf '%s' "${status_json}" | grep -q '"initialized":[[:space:]]*true'; then
log "vault not initialized; skipping"
exit 0
fi
if printf '%s' "${status_json}" | grep -q '"sealed":true'; then
if printf '%s' "${status_json}" | grep -q '"sealed":[[:space:]]*true'; then
log "vault sealed; skipping"
exit 0
fi