From ecd717702d3cbd4fcae3963e84cbb9c990b2c454 Mon Sep 17 00:00:00 2001 From: Jack Kawell Date: Thu, 9 Dec 2021 00:20:10 -0700 Subject: [PATCH] Added client setup check to start_server.sh --- docker/setup.sh | 10 +++++----- docker/start_server.sh | 8 +++++++- 2 files changed, 12 insertions(+), 6 deletions(-) diff --git a/docker/setup.sh b/docker/setup.sh index 98a92515..7bff747d 100755 --- a/docker/setup.sh +++ b/docker/setup.sh @@ -55,7 +55,7 @@ update_ini_values if [[ ! -d "/client" ]]; then echo "Client not found." - echo "Did you forgot to mount the client into the \"/client\" directory?" + echo "Did you forget to mount the client into the \"/client\" directory?" exit 1 fi @@ -66,8 +66,8 @@ if [[ ! -f "/client/extracted" ]]; then touch /client/extracted else - echo "Client already extracted. Skip this step" - echo "If you want to force re-extract, just delete the file called \"extracted\" in the client directory" + echo "Client already extracted. Skip this step..." + echo "If you want to force a re-extract, just delete the file called \"extracted\" in the client directory" fi if [[ ! -f "/client/migrated" ]]; then @@ -77,6 +77,6 @@ if [[ ! -f "/client/migrated" ]]; then touch /client/migrated else - echo "Client db already migrated. Skip this step" - echo "If you want to force re-migrate, just delete the file called \"migrated\" in the client directory" + echo "Client db already migrated. Skip this step..." + echo "If you want to force a re-migrate, just delete the file called \"migrated\" in the client directory" fi diff --git a/docker/start_server.sh b/docker/start_server.sh index 9a2345c6..6dccad7e 100755 --- a/docker/start_server.sh +++ b/docker/start_server.sh @@ -37,7 +37,13 @@ else echo "Server already initialized" fi +# check to make sure the setup has completed +while [ ! -f "/client/extracted" ] || [ ! -f "/client/migrated" ]; do + echo "Client setup not finished. Waiting for setup container to complete..." + sleep 5 +done + # start the server -echo "Start MasterServer" +echo "Starting MasterServer" ./MasterServer tail -f /dev/null \ No newline at end of file