Skip to content

Instantly share code, notes, and snippets.

@dejanvasic85
Created May 8, 2018 00:21
Show Gist options
  • Select an option

  • Save dejanvasic85/75965d6854597fcbc25dcbcf6742b5e5 to your computer and use it in GitHub Desktop.

Select an option

Save dejanvasic85/75965d6854597fcbc25dcbcf6742b5e5 to your computer and use it in GitHub Desktop.
Bash retry
#!/usr/bin/env bash
cluster="cluster-name"
x="aws ecs wait services-stable --cluster $cluster --services $cluster"
echo "Waiting until ecs services report as healthy"
for i in 1 2 3 4 5; do (eval $x) && break || sleep 5; done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment