Skip to content

Instantly share code, notes, and snippets.

@lcherone lcherone/wait.sh
Last active Apr 6, 2018

Embed
What would you like to do?
Linux wait for network connection before continuing. Docker, LXC, containers, cloud-init
#/bin/bash
echo "Waiting for network connection."
while [ 1 ]; do
if ping -q -c 1 -W 1 8.8.8.8 > /dev/null 2>&1; then
break;
fi
sleep 1
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.