blob: b16639ee17cd6a9de47d424efe8d5e16f8f08c05 [file] [log] [blame]
Scott Baker50421662016-06-27 22:09:48 -07001#! /bin/bash
2
3display_usage() {
4 echo -e "\nUsage:\n$0 [xos-listen-port] \n"
5}
6
7if [ $# -lt 1 ]
8then
9 display_usage
10 exit 1
11fi
12
13echo "Waiting for XOS to start listening on port $1"
14until curl 0.0.0.0:$1 &> /dev/null
15do
16 sleep 1
17 echo -ne "."
18 RUNNING_CONTAINER=`sudo docker ps|grep "xos"|awk '{print $$NF}'`
19 if [[ $RUNNING_CONTAINER == "" ]]; then
20 echo Container may have failed. check with \"make showlogs\'
21 exit 1
22 fi
23done
24echo "XOS is ready"