Skip to content

Instantly share code, notes, and snippets.

@reynoldsm88
Created June 9, 2021 21:20
Show Gist options
  • Save reynoldsm88/cfe615a688fd99af8de1376d96ae4515 to your computer and use it in GitHub Desktop.
Save reynoldsm88/cfe615a688fd99af8de1376d96ae4515 to your computer and use it in GitHub Desktop.
wait until a service is listening on a port to execute a script
until [ -n "$APP_UP" ]; do
echo 'service not available yet'
APP_UP=$(netstat -an | grep 1234)
sleep 3
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment