Browse Source

fix(details): check as well queryport via steam (#3719)

pull/3721/head
Christian 3 years ago
committed by GitHub
parent
commit
4b95e7f120
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      lgsm/config-default/config-lgsm/colserver/_default.cfg
  2. 2
      lgsm/config-default/config-lgsm/dodrserver/_default.cfg
  3. 2
      lgsm/config-default/config-lgsm/stnserver/_default.cfg
  4. 2
      lgsm/config-default/config-lgsm/vhserver/_default.cfg
  5. 4
      lgsm/functions/info_distro.sh

2
lgsm/config-default/config-lgsm/colserver/_default.cfg

@ -116,7 +116,7 @@ steamcmdforcewindows="no"
branch=""
betapassword=""
# Master Server | https://docs.linuxgsm.com/steamcmd/steam-master-server
steammaster="false"
steammaster="true"
## Stop Mode | https://docs.linuxgsm.com/features/stop-mode
# 1: tmux kill

2
lgsm/config-default/config-lgsm/dodrserver/_default.cfg

@ -121,7 +121,7 @@ steamcmdforcewindows="no"
branch=""
betapassword=""
# Master Server | https://docs.linuxgsm.com/steamcmd/steam-master-server
steammaster="false"
steammaster="true"
## Stop Mode | https://docs.linuxgsm.com/features/stop-mode
# 1: tmux kill

2
lgsm/config-default/config-lgsm/stnserver/_default.cfg

@ -119,7 +119,7 @@ steamcmdforcewindows="no"
branch=""
betapassword=""
# Master Server | https://docs.linuxgsm.com/steamcmd/steam-master-server
steammaster="false"
steammaster="true"
## Stop Mode | https://docs.linuxgsm.com/features/stop-mode
# 1: tmux kill

2
lgsm/config-default/config-lgsm/vhserver/_default.cfg

@ -124,7 +124,7 @@ steamcmdforcewindows="no"
branch=""
betapassword=""
# Master Server | https://docs.linuxgsm.com/steamcmd/steam-master-server
steammaster="false"
steammaster="true"
## Stop Mode | https://docs.linuxgsm.com/features/stop-mode
# 1: tmux kill

4
lgsm/functions/info_distro.sh

@ -291,11 +291,11 @@ if [ -z "${displaymasterserver}" ]; then
if [ "${steammaster}" == "true" ]||[ "${commandname}" == "DEV-QUERY-RAW" ]; then
# Will query server IP addresses first.
for queryip in "${queryips[@]}"; do
masterserver="$(curl --connect-timeout 10 -m 3 -s 'https://api.steampowered.com/ISteamApps/GetServersAtAddress/v0001?addr='${queryip}':'${port}'&format=json' | jq '.response.servers[]|.addr' | wc -l 2>/dev/null)"
masterserver="$(curl --connect-timeout 10 -m 3 -s "https://api.steampowered.com/ISteamApps/GetServersAtAddress/v0001?addr=${queryip}&format=json" | jq --arg port "${port}" --arg queryport "${queryport}" '.response.servers[] | select((.gameport == ($port|tonumber) or (.gameport == ($queryport|tonumber)))) | .addr' | wc -l 2>/dev/null)"
done
# Should that not work it will try the external IP.
if [ "${masterserver}" == "0" ]; then
masterserver="$(curl --connect-timeout 10 -m 3 -s 'https://api.steampowered.com/ISteamApps/GetServersAtAddress/v0001?addr='${extip}':'${port}'&format=json' | jq '.response.servers[]|.addr' | wc -l 2>/dev/null)"
masterserver="$(curl --connect-timeout 10 -m 3 -s "https://api.steampowered.com/ISteamApps/GetServersAtAddress/v0001?addr=${extip}&format=json" | jq --arg port "${port}" --arg queryport "${queryport}" '.response.servers[] | select((.gameport == ($port|tonumber) or (.gameport == ($queryport|tonumber)))) | .addr' | wc -l 2>/dev/null)"
fi
if [ "${masterserver}" == "0" ]; then
displaymasterserver="false"

Loading…
Cancel
Save