blob: dbfdde89fc9d5e168e14c9b58a76b90f79fcacb2 [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] [name] \n"
5}
6
7if [ $# -lt 2 ]
8then
9 display_usage
10 exit 1
11fi
12
13echo "Waiting for $2 to be onboarded"
14while [[ 1 ]]; do
15 STATUS=`curl 0.0.0.0:$1/api/utility/onboarding/$2/ready/ 2> /dev/null`
16 if [[ "$STATUS" == "true" ]]; then
17 echo "$2 is onboarded"
18 exit 0
19 fi
20 echo -ne "."
21 sleep 1
22# RUNNING_CONTAINER=`sudo docker ps|grep "xos"|awk '{print $$NF}'`
23# if [[ $RUNNING_CONTAINER == "" ]]; then
24# echo Container may have failed. check with \"make showlogs\'
25# exit 1
26# fi
27done
28