Explorar o código

fix(ti): pass EOS credentials as launch arguments (#5061)

The Isle deletes Saved/Config/LinuxServer/Engine.ini during its shutdown
config flush on every graceful stop, so the next start failed with
"Unable to initialize EOS platform". Pass the EOS dedicated server
credentials with -ini:Engine:[EpicOnlineServices] start parameters so the
server no longer depends on that file.

For installs that override startparameters without these arguments,
check_config now restores a missing Engine.ini from the defaults.

Fixes #4936
Daniel Gibbs hai 2 días
pai
achega
e05c4a479b

+ 5 - 1
lgsm/config-default/config-lgsm/tiserver/_default.cfg

@@ -13,9 +13,13 @@ ip="0.0.0.0"
 port="7777"
 defaultmap="/Game/TheIsle/Maps/Game/Gateway/Gateway"
 
+## Epic Online Services (EOS) Dedicated Server Credentials
+eosclientid="xyza7891gk5PRo3J7G9puCJGFJjmEguW"
+eosclientsecret="pKWl6t5i9NJK8gTpVlAxzENZ65P8hYzodV8Dqe5Rlc8"
+
 ## Server Parameters | https://docs.linuxgsm.com/configuration/start-parameters#additional-parameters
 ## Game Server Docs | https://isle.fandom.com/wiki/The_Isle_Server_Settings_and_Configuration
-startparameters="${defaultmap} -Port=${port} -log"
+startparameters="${defaultmap} -Port=${port} -log -ini:Engine:[EpicOnlineServices]:DedicatedServerClientId=${eosclientid} -ini:Engine:[EpicOnlineServices]:DedicatedServerClientSecret=${eosclientsecret}"
 
 #### LinuxGSM Settings ####
 

+ 8 - 0
lgsm/modules/check_config.sh

@@ -15,6 +15,14 @@ if [ -n "${servercfgfullpath}" ] && [ ! -f "${servercfgfullpath}" ]; then
 	install_config.sh
 fi
 
+if [ "${shortname}" == "ti" ] && [[ "${startparameters}" != *"DedicatedServerClientId"* ]] && [ ! -f "${servercfgdir}/Engine.ini" ]; then
+	fn_print_warn_nl "Configuration file missing!"
+	echo -e "${servercfgdir}/Engine.ini"
+	fn_script_log_warn "Configuration file missing!"
+	fn_script_log_warn "${servercfgdir}/Engine.ini"
+	install_config.sh
+fi
+
 if [ "${shortname}" == "rust" ] && [ -v rconpassword ] && [ -z "${rconpassword}" ]; then
 	fn_print_fail_nl "RCON password is not set"
 	fn_script_log_warn "RCON password is not set"