fix: detect vault initialized state correctly
This commit is contained in:
parent
cb5796cb71
commit
50aec198a4
@ -9,12 +9,12 @@ if [ -z "${status_json}" ]; then
|
|||||||
exit 1
|
exit 1
|
||||||
fi
|
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"
|
log "vault not initialized; skipping"
|
||||||
exit 0
|
exit 0
|
||||||
fi
|
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"
|
log "vault sealed; skipping"
|
||||||
exit 0
|
exit 0
|
||||||
fi
|
fi
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user