Skip to content

Instantly share code, notes, and snippets.

@bobmayo56
Created September 14, 2012 01:45
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save bobmayo56/3719318 to your computer and use it in GitHub Desktop.
Save bobmayo56/3719318 to your computer and use it in GitHub Desktop.
#!/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