From: Emilie Zawadzki Date: Mon, 19 Nov 2018 15:48:38 +0000 (+0100) Subject: [restore_db] : replace wait.sh by new script X-Git-Url: https://git.parisson.com/?a=commitdiff_plain;h=500a16a0c05445aae1d43eb88dab84f61243011c;p=docker-django-scripts.git [restore_db] : replace wait.sh by new script --- diff --git a/dev/local/restore_db.sh b/dev/local/restore_db.sh index de93fa3..4c1aaf1 100755 --- a/dev/local/restore_db.sh +++ b/dev/local/restore_db.sh @@ -1,6 +1,6 @@ #!/bin/bash -/srv/bin/wait-for-it/wait-for-it.sh -h localhost -p $DB_PORT; +/srv/bin/misc/wait-for-it/wait-for-it.sh -h localhost -p $DB_PORT; set -e diff --git a/misc/wait.sh b/misc/wait.sh deleted file mode 100755 index af588e9..0000000 --- a/misc/wait.sh +++ /dev/null @@ -1,19 +0,0 @@ -#!/bin/bash - -set -e - -apt update -apt install -y netcat - -HOST=$(env | grep _TCP_ADDR | cut -d = -f 2) -PORT=$(env | grep _TCP_PORT | cut -d = -f 2) - -echo -n "waiting for TCP connection to $HOST:$PORT..." - -while ! nc -w 1 $HOST $PORT 2>/dev/null -do - echo -n . - sleep 1 -done - -echo 'ok'