Added client setup check to start_server.sh

This commit is contained in:
Jack Kawell 2021-12-09 00:20:10 -07:00
parent 18d797150e
commit ecd717702d
2 changed files with 12 additions and 6 deletions

View File

@ -55,7 +55,7 @@ update_ini_values
if [[ ! -d "/client" ]]; then if [[ ! -d "/client" ]]; then
echo "Client not found." 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 exit 1
fi fi
@ -66,8 +66,8 @@ if [[ ! -f "/client/extracted" ]]; then
touch /client/extracted touch /client/extracted
else else
echo "Client already extracted. Skip this step" 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 "If you want to force a re-extract, just delete the file called \"extracted\" in the client directory"
fi fi
if [[ ! -f "/client/migrated" ]]; then if [[ ! -f "/client/migrated" ]]; then
@ -77,6 +77,6 @@ if [[ ! -f "/client/migrated" ]]; then
touch /client/migrated touch /client/migrated
else else
echo "Client db already migrated. Skip this step" 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 "If you want to force a re-migrate, just delete the file called \"migrated\" in the client directory"
fi fi

View File

@ -37,7 +37,13 @@ else
echo "Server already initialized" echo "Server already initialized"
fi 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 # start the server
echo "Start MasterServer" echo "Starting MasterServer"
./MasterServer ./MasterServer
tail -f /dev/null tail -f /dev/null