소스 검색

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 1 일 전
부모
커밋
546a02fdef
1개의 변경된 파일과 8개의 추가작업 그리고 0개의 파일을 삭제
  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