From cb5796cb71e1e0484a4a2cddbe1368729f4655d1 Mon Sep 17 00:00:00 2001 From: Brad Stein Date: Wed, 14 Jan 2026 01:38:27 -0300 Subject: [PATCH] fix: make vault k8s auth script posix --- services/vault/scripts/vault_k8s_auth_configure.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/services/vault/scripts/vault_k8s_auth_configure.sh b/services/vault/scripts/vault_k8s_auth_configure.sh index 9e2f674..4457fc6 100644 --- a/services/vault/scripts/vault_k8s_auth_configure.sh +++ b/services/vault/scripts/vault_k8s_auth_configure.sh @@ -4,17 +4,17 @@ set -eu log() { echo "[vault-k8s-auth] $*"; } status_json="$(vault status -format=json || true)" -if [[ -z "${status_json}" ]]; then +if [ -z "${status_json}" ]; then log "vault status failed; check VAULT_ADDR and VAULT_TOKEN" exit 1 fi -if ! grep -q '"initialized":true' <<<"${status_json}"; then +if ! printf '%s' "${status_json}" | grep -q '"initialized":true'; then log "vault not initialized; skipping" exit 0 fi -if grep -q '"sealed":true' <<<"${status_json}"; then +if printf '%s' "${status_json}" | grep -q '"sealed":true'; then log "vault sealed; skipping" exit 0 fi