Browse Source

Merge branch 'hotfix/v23.3.2' into develop

pull/3880/merge
Daniel Gibbs 2 years ago
parent
commit
08539cf877
  1. 2
      lgsm/modules/core_functions.sh
  2. 2
      lgsm/modules/core_modules.sh
  3. 49
      lgsm/modules/info_game.sh
  4. 5
      linuxgsm.sh
  5. 4
      tests/tests_fctrserver.sh
  6. 4
      tests/tests_jc2server.sh
  7. 4
      tests/tests_mcserver.sh
  8. 4
      tests/tests_ts3server.sh

2
lgsm/modules/core_functions.sh

@ -8,7 +8,7 @@
module_selfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" module_selfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"
modulesversion="v23.3.1" modulesversion="v23.3.2"
# Core # Core

2
lgsm/modules/core_modules.sh

@ -8,7 +8,7 @@
moduleselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" moduleselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"
modulesversion="v23.3.1" modulesversion="v23.3.2"
# Core # Core

49
lgsm/modules/info_game.sh

@ -93,7 +93,7 @@ fn_info_game_json() {
else else
servercfgparse="${servercfgfullpath}" servercfgparse="${servercfgfullpath}"
fi fi
eval "${1}=\"$(jq -r "${2}" "${servercfgfullpath}")\"" eval "${1}=\"$(jq -r "${2}" "${servercfgparse}")\""
configtype="json" configtype="json"
} }
@ -1826,15 +1826,15 @@ fn_info_game_samp() {
# Parameters: false # Parameters: false
# Comment: // or /* */ # Comment: // or /* */
fn_info_game_sb() { fn_info_game_sb() {
if [ ! -f "${servercfgfullpath}" ]; then if [ -f "${servercfgfullpath}" ]; then
fn_info_game_json "maxplayers" "maxPlayers" fn_info_game_json "maxplayers" ".maxPlayers"
fn_info_game_json "port" "gameServerPort" fn_info_game_json "port" ".gameServerPort"
fn_info_game_json "queryenabled" "runQueryServer" fn_info_game_json "queryenabled" ".runQueryServer"
fn_info_game_json "queryport" "queryServerPort" fn_info_game_json "queryport" ".queryServerPort"
fn_info_game_json "rconenabled" "runRconServer" fn_info_game_json "rconenabled" ".runRconServer"
fn_info_game_json "rconpassword" "rconServerPassword" fn_info_game_json "rconpassword" ".rconServerPassword"
fn_info_game_json "rconport" "rconServerPort" fn_info_game_json "rconport" ".rconServerPort"
fn_info_game_json "servername" "serverName" fn_info_game_json "servername" ".serverName"
fi fi
maxplayers="${maxplayers:-"0"}" maxplayers="${maxplayers:-"0"}"
port="${port:-"0"}" port="${port:-"0"}"
@ -1954,11 +1954,11 @@ fn_info_game_sof2() {
# Filetype: ini # Filetype: ini
fn_info_game_sol() { fn_info_game_sol() {
if [ -f "${servercfgfullpath}" ]; then if [ -f "${servercfgfullpath}" ]; then
fn_info_config_ini "adminpassword" "Admin_Password" fn_info_game_ini "adminpassword" "Admin_Password"
fn_info_config_ini "maxplayers" "Max_Players" fn_info_game_ini "maxplayers" "Max_Players"
fn_info_config_ini "port" "Port" fn_info_game_ini "port" "Port"
fn_info_config_ini "servername" "Server_Name" fn_info_game_ini "servername" "Server_Name"
fn_info_config_ini "serverpassword" "Game_Password" fn_info_game_ini "serverpassword" "Game_Password"
fi fi
adminpassword="${adminpassword:-"NOT SET"}" adminpassword="${adminpassword:-"NOT SET"}"
maxplayers="${maxplayers:-"0"}" maxplayers="${maxplayers:-"0"}"
@ -2019,8 +2019,8 @@ fn_info_game_squad() {
fn_info_game_keyvalue_pairs "maxplayers" "MaxPlayers" fn_info_game_keyvalue_pairs "maxplayers" "MaxPlayers"
fi fi
if [ -f "${servercfgdir}/Rcon.cfg" ]; then if [ -f "${servercfgdir}/Rcon.cfg" ]; then
fn_info_game_keyvalue_pairs "rconport" "Port" fn_info_game_keyvalue_pairs "rconport" "Port" "${servercfgdir}/Rcon.cfg"
fn_info_game_keyvalue_pairs "rconpassword" "Password" fn_info_game_keyvalue_pairs "rconpassword" "Password" "${servercfgdir}/Rcon.cfg"
fi fi
maxplayers="${maxplayers:-"0"}" maxplayers="${maxplayers:-"0"}"
port="${port:-"0"}" port="${port:-"0"}"
@ -2441,6 +2441,14 @@ fi
# Steam Master Server - checks if detected by master server. # Steam Master Server - checks if detected by master server.
# Checked after config init, as the queryport is needed # Checked after config init, as the queryport is needed
if [ -z "${displaymasterserver}" ]; then if [ -z "${displaymasterserver}" ]; then
# if queryport and port3 are not set then set them to 123456789
# this is to prevent the query from failing.
if [ -z "${queryport}" ]; then
queryport="123456789"
fi
if [ -z "${port3}" ]; then
port3="123456789"
fi
if [ "$(command -v jq 2> /dev/null)" ]; then if [ "$(command -v jq 2> /dev/null)" ]; then
if [ -n "${ip}" ] && [ -n "${port}" ]; then if [ -n "${ip}" ] && [ -n "${port}" ]; then
if [ "${steammaster}" == "true" ] || [ "${commandname}" == "DEV-QUERY-RAW" ]; then if [ "${steammaster}" == "true" ] || [ "${commandname}" == "DEV-QUERY-RAW" ]; then
@ -2460,4 +2468,11 @@ if [ -z "${displaymasterserver}" ]; then
fi fi
fi fi
fi fi
# unset the ports if they are set to 123456789
if [ "${port3}" == "123456789" ]; then
unset port3
fi
if [ "${queryport}" == "123456789" ]; then
unset queryport
fi
fi fi

5
linuxgsm.sh

@ -20,7 +20,7 @@ if [ -f ".dev-debug" ]; then
set -x set -x
fi fi
version="v23.3.1" version="v23.3.2"
shortname="core" shortname="core"
gameservername="core" gameservername="core"
commandname="CORE" commandname="CORE"
@ -369,7 +369,8 @@ if [ "${shortname}" == "core" ]; then
if [ "${userinput}" == "${gameservername}" ] || [ "${userinput}" == "${gamename}" ] || [ "${userinput}" == "${shortname}" ]; then if [ "${userinput}" == "${gameservername}" ] || [ "${userinput}" == "${gamename}" ] || [ "${userinput}" == "${shortname}" ]; then
fn_install_file fn_install_file
else else
echo -e "[ FAIL ] unknown game server" echo -e "[ FAIL ] Unknown game server"
exit 1
fi fi
else else
fn_install_getopt fn_install_getopt

4
tests/tests_fctrserver.sh

@ -20,7 +20,7 @@ if [ -f ".dev-debug" ]; then
set -x set -x
fi fi
version="v23.3.1" version="v23.3.2"
shortname="fctr" shortname="fctr"
gameservername="fctrserver" gameservername="fctrserver"
commandname="CORE" commandname="CORE"
@ -369,7 +369,7 @@ if [ "${shortname}" == "core" ]; then
if [ "${userinput}" == "${gameservername}" ] || [ "${userinput}" == "${gamename}" ] || [ "${userinput}" == "${shortname}" ]; then if [ "${userinput}" == "${gameservername}" ] || [ "${userinput}" == "${gamename}" ] || [ "${userinput}" == "${shortname}" ]; then
fn_install_file fn_install_file
else else
echo -e "[ FAIL ] unknown game server" echo -e "[ FAIL ] Unknown game server"
fi fi
else else
fn_install_getopt fn_install_getopt

4
tests/tests_jc2server.sh

@ -20,7 +20,7 @@ if [ -f ".dev-debug" ]; then
set -x set -x
fi fi
version="v23.3.1" version="v23.3.2"
shortname="jc2" shortname="jc2"
gameservername="jc2server" gameservername="jc2server"
commandname="CORE" commandname="CORE"
@ -370,7 +370,7 @@ if [ "${shortname}" == "core" ]; then
if [ "${userinput}" == "${gameservername}" ] || [ "${userinput}" == "${gamename}" ] || [ "${userinput}" == "${shortname}" ]; then if [ "${userinput}" == "${gameservername}" ] || [ "${userinput}" == "${gamename}" ] || [ "${userinput}" == "${shortname}" ]; then
fn_install_file fn_install_file
else else
echo -e "[ FAIL ] unknown game server" echo -e "[ FAIL ] Unknown game server"
fi fi
else else
fn_install_getopt fn_install_getopt

4
tests/tests_mcserver.sh

@ -20,7 +20,7 @@ if [ -f ".dev-debug" ]; then
set -x set -x
fi fi
version="v23.3.1" version="v23.3.2"
shortname="mc" shortname="mc"
gameservername="mcserver" gameservername="mcserver"
commandname="CORE" commandname="CORE"
@ -370,7 +370,7 @@ if [ "${shortname}" == "core" ]; then
if [ "${userinput}" == "${gameservername}" ] || [ "${userinput}" == "${gamename}" ] || [ "${userinput}" == "${shortname}" ]; then if [ "${userinput}" == "${gameservername}" ] || [ "${userinput}" == "${gamename}" ] || [ "${userinput}" == "${shortname}" ]; then
fn_install_file fn_install_file
else else
echo -e "[ FAIL ] unknown game server" echo -e "[ FAIL ] Unknown game server"
fi fi
else else
fn_install_getopt fn_install_getopt

4
tests/tests_ts3server.sh

@ -20,7 +20,7 @@ if [ -f ".dev-debug" ]; then
set -x set -x
fi fi
version="v23.3.1" version="v23.3.2"
shortname="ts3" shortname="ts3"
gameservername="ts3server" gameservername="ts3server"
commandname="CORE" commandname="CORE"
@ -370,7 +370,7 @@ if [ "${shortname}" == "core" ]; then
if [ "${userinput}" == "${gameservername}" ] || [ "${userinput}" == "${gamename}" ] || [ "${userinput}" == "${shortname}" ]; then if [ "${userinput}" == "${gameservername}" ] || [ "${userinput}" == "${gamename}" ] || [ "${userinput}" == "${shortname}" ]; then
fn_install_file fn_install_file
else else
echo -e "[ FAIL ] unknown game server" echo -e "[ FAIL ] Unknown game server"
fi fi
else else
fn_install_getopt fn_install_getopt

Loading…
Cancel
Save