Last active
May 17, 2018 18:26
-
-
Save bthelen/6c4308260d2b46efbbbbe5665757b610 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /usr/bin/env bash | |
function waitForServicesToInitialize() { | |
# Wait until services are ready | |
while cf services | grep 'create in progress' | |
do | |
sleep 10 | |
echo "Waiting for services to initialize..." | |
done | |
# Check to see if any services failed to create | |
if cf services | grep 'create failed'; then | |
echo "Service initialization - failed. Exiting." | |
return 1 | |
fi | |
echo "Service initialization - successful" | |
} | |
waitForServicesToInitialize |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment