Browse Source

feat(armar): move queryport to config parser and add adminpass

pull/3871/head
H3o66 3 years ago
parent
commit
6783e8f476
  1. 5
      lgsm/config-default/config-lgsm/armarserver/_default.cfg
  2. 1
      lgsm/functions/fix_armar.sh
  3. 6
      lgsm/functions/info_game.sh

5
lgsm/config-default/config-lgsm/armarserver/_default.cfg

@ -8,13 +8,10 @@
#### Game Server Settings ####
# https://community.bistudio.com/wiki/Arma_Reforger:Server_Hosting
# MaxFPS to limit the used Server resouces
maxfps="60"
# Queryport cannot be changed according to the wiki
# https://community.bistudio.com/wiki/Arma_Reforger:Server_Hosting
queryport="17777"
# Profile Name
serverprofile="server"
serverprofilefullpath="${serverfiles}/profiles/${serverprofile}"

1
lgsm/functions/fix_armar.sh

@ -8,6 +8,7 @@
functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"
# Fixes: Profile directory doesn't exist.
# Issue Link: https://feedback.bistudio.com/T164845
if [ ! -d "${serverprofilefullpath}" ]; then
fixname="Profile directory doesn't exist"
fn_fix_msg_start

6
lgsm/functions/info_game.sh

@ -97,18 +97,22 @@ fn_info_game_armar(){
if [ -f "${servercfgfullpath}" ]; then
configip=$(jq -r '.gameHostBindAddress' "${servercfgfullpath}")
port=$(jq -r '.gameHostBindPort' "${servercfgfullpath}")
queryport=$(jq -r '.steamQueryPort' "${servercfgfullpath}")
servername=$(jq -r '.game.name' "${servercfgfullpath}")
serverpassword=$(jq -r '.game.password' "${servercfgfullpath}")
maxplayers=$(jq -r '.game.playerCountLimit' "${servercfgfullpath}")
adminpassword=$(jq -r '.adminPassword' "${servercfgfullpath}")
# Not set
configip=${configip:-"0.0.0.0"}
port=${port:-"0"}
queryport=${queryport:-"0"}
servername=${servername:-"NOT SET"}
serverpassword=${serverpassword:-"NOT SET"}
maxplayers=${maxplayers:-"0"}
adminpassword=${adminpassword:-"NOT SET"}
else
port=${zero}
port=${port:-"0"}
servername="${unavailable}"
serverpassword="${unavailable}"
fi

Loading…
Cancel
Save