Skip to content

Instantly share code, notes, and snippets.

@get-data-
Created June 23, 2019 17:24
Show Gist options
  • Save get-data-/48696764c82c414ce32b2fd3fa693b35 to your computer and use it in GitHub Desktop.
Save get-data-/48696764c82c414ce32b2fd3fa693b35 to your computer and use it in GitHub Desktop.
Wrap install command in while loop so install can try again when it gets blocked by other installations
#!/bin/bash
until service codedeploy-agent status >/dev/null 2>&1; do
sleep 60
rm -f install
wget https://aws-codedeploy-us-west-2.s3.amazonaws.com/latest/install
chmod +x ./install
sudo ./install auto
service codedeploy-agent restart
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment