Skip to content

Instantly share code, notes, and snippets.

@maggocnx
Created November 28, 2013 15:47
Show Gist options
  • Save maggocnx/7693959 to your computer and use it in GitHub Desktop.
Save maggocnx/7693959 to your computer and use it in GitHub Desktop.
Waiting for server going online
#! /bin/bash
wait=true
while $wait
do
sleep 1
ready=$(curl -sL -w "%{http_code}\\n" $1 -o /dev/null)
if [ $ready -eq 200 ]
then
wait=false
fi
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment