Skip to content

Commit

Permalink
moved the use of VAULT_KEYS var under check on it
Browse files Browse the repository at this point in the history
  • Loading branch information
hoeghh committed May 22, 2021
1 parent 4c4abdd commit d0387df
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion scripts/vault-unseal.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@

VAULT_SCHEME="https"
VAULT_PORT="8200"
UNSEAL_KEYS=$(cat $VAULT_KEYS | jq -r '.keys[]' )

if [ ! -z "$VAULT_KEYS" ] && [ ! -z "$VAULT_IP" ];then
UNSEAL_KEYS=$(cat $VAULT_KEYS | jq -r '.keys[]' )
while IFS= read -r line; do
eval curl --verbose --request PUT --insecure --data "'{\"key\": \"$line\"}'" ${VAULT_SCHEME}://${VAULT_IP}:$VAULT_PORT/v1/sys/unseal
#vault operator unseal --tls-skip-verify -address=${VAULT_SCHEME}://${VAULT_IP}:$VAULT_PORT $line
Expand Down

0 comments on commit d0387df

Please sign in to comment.