mirror of
https://github.com/DarkflameUniverse/DarkflameServer.git
synced 2025-10-14 11:28:08 +00:00
Address Docker issues and remove need to extract cdclient.fdb (#895)
* Implement a server res directory * Only convert if neither exist * Remove unzip, Update RegEx * readme updates Run setup after setting working dir Address several docker issues Revert "Run setup after setting working dir" This reverts commit fd2fb9228e82a350204c1ef61f7ba059479bb12f. Fix docker * Remove extra submodules * Rework logic * Switch if block * Remove need to extract fdb from client * Change log name * Update FdbToSqlite.cpp
This commit is contained in:
29
docker/start_server.sh
Normal file → Executable file
29
docker/start_server.sh
Normal file → Executable file
@@ -1,25 +1,5 @@
|
||||
#!/bin/bash
|
||||
|
||||
function symlink_client_files() {
|
||||
echo "Creating symlinks for client files"
|
||||
ln -s /client/client/res/macros/ /app/res/macros
|
||||
ln -s /client/client/res/BrickModels/ /app/res/BrickModels
|
||||
ln -s /client/client/res/chatplus_en_us.txt /app/res/chatplus_en_us.txt
|
||||
ln -s /client/client/res/names/ /app/res/names
|
||||
ln -s /client/client/res/CDServer.sqlite /app/res/CDServer.sqlite
|
||||
|
||||
# need to create this file so the server knows the client is unpacked (see `dCommon/dClient/AssetManager.cpp`)
|
||||
touch /app/res/cdclient.fdb
|
||||
# need to iterate over entries in maps due to maps already being a directory with navmeshes/ in it
|
||||
(
|
||||
cd /client/client/res/maps
|
||||
readarray -d '' entries < <(printf '%s\0' * | sort -zV)
|
||||
for entry in "${entries[@]}"; do
|
||||
ln -s /client/client/res/maps/$entry /app/res/maps/
|
||||
done
|
||||
)
|
||||
}
|
||||
|
||||
function symlink_config_files() {
|
||||
echo "Creating symlinks for config files"
|
||||
rm /app/*.ini
|
||||
@@ -30,15 +10,8 @@ function symlink_config_files() {
|
||||
ln -s /shared_configs/configs/sharedconfig.ini /app/sharedconfig.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
|
||||
symlink_config_files
|
||||
# do not run symlinks more than once
|
||||
touch /app/initialized
|
||||
@@ -49,4 +22,4 @@ fi
|
||||
# start the server
|
||||
echo "Starting MasterServer"
|
||||
./MasterServer
|
||||
tail -f /dev/null
|
||||
tail -f /dev/null
|
||||
|
Reference in New Issue
Block a user