Explorar el Código

fix(cmw): apply config changes to the game's own config copy (#5174)

The Linux Chivalry: Medieval Warfare server copies the LinuxGSM managed
PCServer-UDKGame.ini to
~/.local/share/TornBanner/Chivalry/UDKGame/Config/<instance>/ on its
first start and only reads that copy afterwards, so later edits to the
LinuxGSM config were ignored.

fix_cmw.sh now copies the LinuxGSM config over the game's copy before
start when the LinuxGSM config is newer. Settings the game saves itself
are kept until the LinuxGSM config is edited again.
Daniel Gibbs hace 1 día
padre
commit
546a02fdef
Se han modificado 1 ficheros con 8 adiciones y 0 borrados
  1. 8 0
      lgsm/modules/fix_cmw.sh

+ 8 - 0
lgsm/modules/fix_cmw.sh

@@ -23,3 +23,11 @@ if [ ! -f "${servercfgfullpath}" ]; then
 	cp "${systemdir}/UDKGame/Config/"*.ini "${servercfgdir}"
 	fn_fix_msg_end
 fi
+
+cmwuserconfig="${HOME}/.local/share/TornBanner/Chivalry/UDKGame/Config/${selfname}/${servercfg}"
+if [ -f "${servercfgfullpath}" ] && [ -f "${cmwuserconfig}" ] && [ "${servercfgfullpath}" -nt "${cmwuserconfig}" ]; then
+	fixname="sync config"
+	fn_fix_msg_start
+	cp -f "${servercfgfullpath}" "${cmwuserconfig}"
+	fn_fix_msg_end
+fi