From ed7ff3b81029ada3ed50156de542dd273cbd23de 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 9e2f6743..4457fc69 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