Improve order of execution for start_server.sh

Suggested by @Marcono1234
This commit is contained in:
Nils Bergmann 2021-12-31 14:12:09 +01:00
parent f53a43631c
commit d501a85c51
No known key found for this signature in database
GPG Key ID: 5FAEC08EE1DC2DF9

View File

@ -27,6 +27,12 @@ function symlink_config_files() {
ln -s /shared_configs/configs/worldconfig.ini /app/worldconfig.ini
}
# 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
if [[ ! -f "/app/initialized" ]]; then
# setup symlinks for volume files
symlink_client_files
@ -37,12 +43,6 @@ 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 "Starting MasterServer"
./MasterServer