Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change sleep to timeout in docker init script #1680

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 9 additions & 3 deletions extras/docker/initDockerLicode.sh
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ check_result() {
run_rabbitmq() {
echo "Starting Rabbitmq"
rabbitmq-server -detached
sleep 5
timeout 15 bash -c 'until printf "" 2>>/dev/null >>/dev/tcp/$0/$1; do sleep 1; done' localhost 5672
}

run_mongo() {
Expand All @@ -75,7 +75,7 @@ run_mongo() {
fi
mongod --repair --dbpath $DB_DIR
mongod --nojournal --dbpath $DB_DIR --logpath $BUILD_DIR/mongo.log --fork
sleep 5
timeout 15 bash -c 'until printf "" 2>>/dev/null >>/dev/tcp/$0/$1; do sleep 1; done' localhost 27017
else
echo [licode] mongodb already running
fi
Expand Down Expand Up @@ -112,7 +112,13 @@ run_nuve() {
echo "Starting Nuve"
cd $ROOT/nuve/nuveAPI
node nuve.js &
sleep 5

nuvePort=`grep "config.nuve.port" $SCRIPTS/licode_default.js`

nuvePort=`echo $nuvePort| cut -d';' -f 1`
nuvePort=`echo $nuvePort| cut -d'=' -f 2`

timeout 15 bash -c 'until printf "" 2>>/dev/null >>/dev/tcp/$0/$1; do sleep 1; done' localhost $nuvePort
}
run_erizoController() {

Expand Down