From 4d587e3bc699367316d9a1017cc5f92718dfd987 Mon Sep 17 00:00:00 2001 From: Christian Date: Tue, 15 Sep 2020 09:52:58 +0200 Subject: [PATCH] fix(eco): display correct values in display and fixup (#3034) --- lgsm/functions/info_config.sh | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/lgsm/functions/info_config.sh b/lgsm/functions/info_config.sh index f6456d574..4804207aa 100644 --- a/lgsm/functions/info_config.sh +++ b/lgsm/functions/info_config.sh @@ -353,6 +353,7 @@ fn_info_config_dontstarve(){ fn_info_config_eco(){ if [ ! -f "${servercfgfullpath}" ]; then + configip="${unavailable}" servername="${unavailable}" serverpassword="${unavailable}" maxplayers="${zero}" @@ -360,14 +361,16 @@ fn_info_config_eco(){ port="${zero}" webadminport="${zero}" else - servername=$(jq -r .Description "${servercfgdir}/Network.eco") - serverpassword=$(jq -r .Password "${servercfgdir}/Network.eco") - maxplayers=$(jq -r .MaxConnections "${servercfgdir}/Network.eco") - tickrate=$(jq -r .MaxConnections "${servercfgdir}/Network.eco") - port=$(jq -r .Rate "${servercfgdir}/Network.eco") - webadminport=$(jq -r .WebServerPort "${servercfgdir}/Network.eco") + configip=$(jq -r '.IPAddress' "${servercfgfullpath}") + servername=$(jq -r '.Description' "${servercfgfullpath}") + serverpassword=$(jq -r '.Password' "${servercfgfullpath}") + maxplayers=$(jq -r '.MaxConnections' "${servercfgfullpath}") + tickrate=$(jq -r '.Rate' "${servercfgfullpath}") + port=$(jq -r '.GameServerPort' "${servercfgfullpath}") + webadminport=$(jq -r '.WebServerPort' "${servercfgfullpath}") # Not Set + configip=${configip:-"NOT SET"} servername=${servername:-"NOT SET"} serverpassword=${serverpassword:-"NOT SET"} maxplayers=${maxplayers=:-"0"}