diff --git a/lgsm/config-default/config-lgsm/inssserver/_default.cfg b/lgsm/config-default/config-lgsm/inssserver/_default.cfg index 5317f6be9..eb26d9211 100644 --- a/lgsm/config-default/config-lgsm/inssserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/inssserver/_default.cfg @@ -20,7 +20,7 @@ defaultscenario="Scenario_Crossing_Push_Security" maxplayers="28" ## Server Parameters | https://docs.linuxgsm.com/configuration/start-parameters#additional-parameters -## Parameter Docs | https://sandstorm-support.newworldinteractive.com/hc/en-us/articles/360049211072-Server-Admin-Guide +## Parameter Docs | https://mod.io/g/insurgencysandstorm/r/server-admin-guide startparameters="${defaultmap}?Scenario=${defaultscenario}?MaxPlayers=${maxplayers} -Port=${port} -QueryPort=${queryport} -hostname='${servername}' -Rcon -RconPassword=${rconpassword} -RconListenPort=${rconport} -log" #### LinuxGSM Settings #### diff --git a/lgsm/modules/info_game.sh b/lgsm/modules/info_game.sh index a30b51646..6f5abe328 100644 --- a/lgsm/modules/info_game.sh +++ b/lgsm/modules/info_game.sh @@ -1451,21 +1451,20 @@ fn_info_game_nec() { serverpassword="${serverpassword:-"NOT SET"}" } +# Config Type: ini +# Parameters: true +# Comment: ; or # +# Example: ServerName=SERVERNAME +# Filetype: ini fn_info_game_ohd(){ if [ -f "${servercfgfullpath}" ]; then - # get first match after find RCON - rconenabled=$(sed -nr '1,/RCON/s/^bEnabled=(.*)/\1/p' "${servercfgfullpath}") - rconport=$(sed -nr '1,/RCON/s/^ListenPort=(.*)/\1/p' "${servercfgfullpath}") - rconpassword=$(sed -nr '1,/RCON/s/^Password=(.*)/\1/p' "${servercfgfullpath}") - - rconenabled=${rconenabled:-"false"} - rconport=${rconport:-"7779"} - rconpassword=${rconpassword:-"NOT SET"} - else - rconenabled="${unavailable}" - rconport="7779" - rconpassword="${unavailable}" + fn_info_game_ini rconenabled "bEnabled" + fn_info_game_ini rconport "ListenPort" + fn_info_game_ini rconpassword "Password" fi + rconenabled="${rconenabled:-"false"}" + rconport="${rconport:-"0"}" + rconpassword="${rconpassword:-"NOT SET"}" } # Config Type: json