From dc14173fcb410cdbaa4be13aa0a30edf480d1cdb Mon Sep 17 00:00:00 2001 From: xdrm-brackets Date: Thu, 15 Mar 2018 13:36:24 +0100 Subject: [PATCH] [post-start.script] now works with timeout for testing mariadb.socket --- metactl/post-start.sh | 4 ++-- virtual/vhost | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/metactl/post-start.sh b/metactl/post-start.sh index 06155a2..e75baa4 100644 --- a/metactl/post-start.sh +++ b/metactl/post-start.sh @@ -18,10 +18,10 @@ docker exec $MARIADB_SERVICE mysql -uroot -p$MARIADB_ROOT_PASSWORD 2>/dev/null; DB_RESTORED="$?"; # Try until connection OK -while [ "$DB_RESTORED" != "0" ]; do +while [ "$DB_RESTORED" == "1" ]; do sleep .5; echo -ne "."; - docker exec $MARIADB_SERVICE mysql -uroot -p$MARIADB_ROOT_PASSWORD 2>/dev/null; + timeout .1 docker exec $MARIADB_SERVICE mysql -uroot -p$MARIADB_ROOT_PASSWORD 2>/dev/null; DB_RESTORED="$?"; done; diff --git a/virtual/vhost b/virtual/vhost index 4175d57..688b0c1 160000 --- a/virtual/vhost +++ b/virtual/vhost @@ -1 +1 @@ -Subproject commit 4175d578b051213cc18468a2c90f1654d42bd710 +Subproject commit 688b0c10c8a76ad4da1c0f3935813d0425e82739