Created
September 14, 2012 01:45
-
-
Save bobmayo56/3719318 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
#!/bin/bash | |
deploy() { | |
jitsu stop | |
sleep 5 | |
echo yes | jitsu deploy | |
} | |
let count=0 | |
while [[ $count -lt 10 ]] | |
do | |
echo Attempting deploy at `date` | |
let count=count+1 | |
deploy | |
if [[ $? -eq 0 ]] | |
then | |
echo Success on attempt $count at `date` | |
exit 0 | |
else | |
echo Failed on attempt $count at `date` | |
sleep 10 | |
echo ' ' | |
fi | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment