diff --git a/README.md b/README.md index 625ea10cf..c775b256c 100644 --- a/README.md +++ b/README.md @@ -212,6 +212,7 @@ It is highly recommended you set the following environment values before startin | DISCORD_PRE_START_MESSAGE | Discord message sent when server begins to start | Server is started! | "string" | | DISCORD_PRE_SHUTDOWN_MESSAGE | Discord message sent when server begins to shutdown | Server is shutting down... | "string" | | DISCORD_POST_SHUTDOWN_MESSAGE | Discord message sent when server has stopped | Server is stopped! | "string" | +| DISABLE_GENERATE_SETTINGS | Whether to automatically generate the PalWorldSettings.ini | false | true/false | *highly recommended to set diff --git a/scripts/compile-settings.sh b/scripts/compile-settings.sh index 9501af473..1df08e095 100755 --- a/scripts/compile-settings.sh +++ b/scripts/compile-settings.sh @@ -155,7 +155,7 @@ fi cat > "$config_file" < /dev/null + else + timeout --preserve-status 15s ./PalServer.sh 1> /dev/null + fi + + # Wait for shutdown + sleep 5 + cp /palworld/DefaultPalWorldSettings.ini /palworld/Pal/Saved/Config/LinuxServer/PalWorldSettings.ini + fi +else + printf "\e[0;32m%s\e[0m\n" "*****GENERATING CONFIG*****" + printf "\e[0;32m%s\e[0m\n" "***Using Env vars to create PalWorldSettings.ini***" + /home/steam/server/compile-settings.sh +fi + rm -f "/home/steam/server/crontab" if [ "${BACKUP_ENABLED,,}" = true ]; then echo "BACKUP_ENABLED=${BACKUP_ENABLED,,}"