diff --git a/lgsm/functions/command_debug.sh b/lgsm/functions/command_debug.sh index 7925e3ff9..aac203ac9 100755 --- a/lgsm/functions/command_debug.sh +++ b/lgsm/functions/command_debug.sh @@ -67,6 +67,8 @@ fi if [ "${serverpassword}" ]; then echo -e "${lightblue}Server password:\t${default}${serverpassword}" fi + +fn_reload_startparameters echo -e "${lightblue}Start parameters:${default}" if [ "${engine}" == "source" ]||[ "${engine}" == "goldsrc" ]; then echo -e "${executable} ${startparameters} -debug" diff --git a/lgsm/functions/command_start.sh b/lgsm/functions/command_start.sh index e06a0e3e5..1088998e5 100755 --- a/lgsm/functions/command_start.sh +++ b/lgsm/functions/command_start.sh @@ -71,6 +71,7 @@ fn_start_tmux(){ date '+%s' > "${lockdir}/${selfname}.lock" echo "${version}" >> "${lockdir}/${selfname}.lock" echo "${port}" >> "${lockdir}/${selfname}.lock" + fn_reload_startparameters cd "${executabledir}" || exit tmux new-session -d -x "${sessionwidth}" -y "${sessionheight}" -s "${sessionname}" "${preexecutable} ${executable} ${startparameters}" 2> "${lgsmlogdir}/.${selfname}-tmux-error.tmp" @@ -126,6 +127,7 @@ fn_start_tmux(){ echo -e "" echo -e "Command" echo -e "=================================" + fn_reload_startparameters echo -e "tmux new-session -d -s \"${sessionname}\" \"${preexecutable} ${executable} ${startparameters}\"" | tee -a "${lgsmlog}" echo -e "" echo -e "Error" diff --git a/lgsm/functions/core_legacy.sh b/lgsm/functions/core_legacy.sh index e28cb7457..811acfbba 100755 --- a/lgsm/functions/core_legacy.sh +++ b/lgsm/functions/core_legacy.sh @@ -79,5 +79,6 @@ if [ -z "${wsstartmap}" ]; then fi fn_parms(){ -parms="${startparameters}" + fn_reload_startparameters + parms="${startparameters}" } diff --git a/linuxgsm.sh b/linuxgsm.sh index 08bb0975f..ea29b72a6 100755 --- a/linuxgsm.sh +++ b/linuxgsm.sh @@ -478,7 +478,7 @@ else elif grep -qE "^[[:blank:]]*preexecutable=" "${configdirserver}/_default.cfg"; then eval preexecutable="$(sed -nr 's/^ *preexecutable=(.*)$/\1/p' "${configdirserver}/_default.cfg")" fi - + # For legacy configs that still use parms= 15.03.21 if grep -qE "^[[:blank:]]*parms=" "${configdirserver}/secrets-${selfname}.cfg"; then eval parms="$(sed -nr 's/^ *parms=(.*)$/\1/p' "${configdirserver}/secrets-${selfname}.cfg")" @@ -497,7 +497,6 @@ else fi } - fn_reload_startparameters # Load the linuxgsm.sh in to tmpdir. If missing download it. if [ ! -f "${tmpdir}/linuxgsm.sh" ]; then fn_fetch_file_github "" "linuxgsm.sh" "${tmpdir}" "chmodx" "norun" "noforcedl" "nomd5"