Skip to content

Commit

Permalink
Merge pull request #10 from dockito/retry-connection
Browse files Browse the repository at this point in the history
Retry connection
  • Loading branch information
pirelenito committed Nov 11, 2015
2 parents 3c2b03c + 4e82b31 commit 8539544
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions ONVAULT
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,15 @@ log () {
echo -e "${GREEN}[Dockito Vault]${NC} $@"
}

if ! curl -s "${VAULT_URI}/_ping"; then
COUNTER=0
echo 'Waiting 10s for dockito/vault to be ready...'
while ! curl -s "${VAULT_URI}/_ping" && [ $COUNTER != 10 ]; do
sleep 1
COUNTER=$[$COUNTER +1]
done
fi

if curl -s "${VAULT_URI}/_ping"; then
log "Downloading private keys..."

Expand Down

0 comments on commit 8539544

Please sign in to comment.