diff --git a/vault/scripts/vault-snapshot.sh b/vault/scripts/vault-snapshot.sh index bbaa964..029d98b 100644 --- a/vault/scripts/vault-snapshot.sh +++ b/vault/scripts/vault-snapshot.sh @@ -29,7 +29,7 @@ echo "${DATE} : Récupération du token" | tee -a "${LOGFILE}" TOKEN=$(/usr/bin/vault write -field="token" auth/approle/login role_id="${ROLEID}" secret_id="${SECRETID}") export VAULT_TOKEN="${TOKEN}" -# Check if the node is the active one, if not we stop. +# Check if the node is the active one, if not we stop. STANDBY=$(/usr/bin/vault read sys/health -format=json | jq '.data.standby') if [ ! "${STANDBY}" == "false" ]; then echo "${DATE} : Noeud en standby, on arrête le snapshot" | tee -a "${LOGFILE}"