diff --git a/lgsm/config-default/config-lgsm/arkserver/_default.cfg b/lgsm/config-default/config-lgsm/arkserver/_default.cfg index f391bb9b5..e3fb9654e 100644 --- a/lgsm/config-default/config-lgsm/arkserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/arkserver/_default.cfg @@ -19,7 +19,7 @@ altsavedirectoryname="${defaultmap}" maxplayers="70" ## Server Parameters | https://docs.linuxgsm.com/configuration/start-parameters#additional-parameters -startparameters="${defaultmap}?AltSaveDirectoryName=${altsavedirectoryname}?listen?MultiHome=${ip}?MaxPlayers=${maxplayers}?QueryPort=${queryport}?RCONPort=${rconport}?Port=${port} -automanagedmods -crossplay -PublicIPForEpic=${ip}" +startparameters="${defaultmap}?AltSaveDirectoryName=${altsavedirectoryname}?listen?MultiHome=${ip}?MaxPlayers=${maxplayers}?QueryPort=${queryport}?RCONPort=${rconport}?Port=${port} -automanagedmods -crossplay -PublicIPForEpic=${publicip}" #### LinuxGSM Settings #### diff --git a/lgsm/config-default/config-lgsm/btlserver/_default.cfg b/lgsm/config-default/config-lgsm/btlserver/_default.cfg index f1e744972..e26ca7e77 100644 --- a/lgsm/config-default/config-lgsm/btlserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/btlserver/_default.cfg @@ -14,7 +14,7 @@ port="7777" queryport="7780" ## Server Parameters | https://docs.linuxgsm.com/configuration/start-parameters#additional-parameters -startparameters="/Game/Maps/Final_Maps/Derailed?Game=/Script/ShooterGame.WartideGameMode?listen -log -broadcastip=\"${extip}\" -PORT=${port} -QueryPort=${queryport} -defgameini=\"${servercfgfullpath}\"" +startparameters="/Game/Maps/Final_Maps/Derailed?Game=/Script/ShooterGame.WartideGameMode?listen -log -broadcastip=\"${publicip}\" -PORT=${port} -QueryPort=${queryport} -defgameini=\"${servercfgfullpath}\"" #### LinuxGSM Settings #### diff --git a/lgsm/modules/command_debug.sh b/lgsm/modules/command_debug.sh index c544e3e2a..41722e507 100644 --- a/lgsm/modules/command_debug.sh +++ b/lgsm/modules/command_debug.sh @@ -58,9 +58,9 @@ fi echo -e "${lightblue}Game Server IP:\t${default}${ip}:${port}" # External server IP. -if [ "${extip}" ]; then - if [ "${ip}" != "${extip}" ]; then - echo -e "${lightblue}Internet IP:\t${default}${extip}:${port}" +if [ "${publicip}" ]; then + if [ "${ip}" != "${publicip}" ]; then + echo -e "${lightblue}Internet IP:\t${default}${publicip}:${port}" fi fi diff --git a/lgsm/modules/command_dev_details.sh b/lgsm/modules/command_dev_details.sh index 28abb87b1..b95418121 100644 --- a/lgsm/modules/command_dev_details.sh +++ b/lgsm/modules/command_dev_details.sh @@ -44,7 +44,7 @@ declare -A server_details=( ['HTTP Password']="${httppassword}" ['HTTP Port']="${httpport}" ['HTTP User']="${httpuser}" - ['Internet IP']="${extip}" + ['Internet IP']="${publicip}" ['LAN Port']="${lanport}" ['Master Port']="${masterport}" ['Master']="${master}" diff --git a/lgsm/modules/info_game.sh b/lgsm/modules/info_game.sh index 5eea7dfba..641f5eeb1 100644 --- a/lgsm/modules/info_game.sh +++ b/lgsm/modules/info_game.sh @@ -2378,30 +2378,30 @@ fi # External IP address # Cache external IP address for 24 hours -if [ -f "${tmpdir}/extip.txt" ]; then - if [ "$(find "${tmpdir}/extip.txt" -mmin +1440)" ]; then - rm -f "${tmpdir:?}/extip.txt" +if [ -f "${tmpdir}/publicip.txt" ]; then + if [ "$(find "${tmpdir}/publicip.txt" -mmin +1440)" ]; then + rm -f "${tmpdir:?}/publicip.txt" fi fi -if [ ! -f "${tmpdir}/extip.txt" ]; then - extip="$(curl --connect-timeout 10 -s https://api.ipify.org 2> /dev/null)" +if [ ! -f "${tmpdir}/publicip.txt" ]; then + publicip="$(curl --connect-timeout 10 -s https://api.ipify.org 2> /dev/null)" exitcode=$? - # if curl passes add extip to externalip.txt + # if curl passes add publicip to externalip.txt if [ "${exitcode}" == "0" ]; then - echo "${extip}" > "${tmpdir}/extip.txt" + echo "${publicip}" > "${tmpdir}/publicip.txt" else echo "Unable to get external IP address" fi else - extip="$(cat "${tmpdir}/extip.txt")" + publicip="$(cat "${tmpdir}/publicip.txt")" fi # Alert IP address if [ "${displayip}" ]; then alertip="${displayip}" -elif [ "${extip}" ]; then - alertip="${extip}" +elif [ "${publicip}" ]; then + alertip="${publicip}" else alertip="${ip}" fi @@ -2421,7 +2421,7 @@ if [ -z "${displaymasterserver}" ]; then if [ -n "${ip}" ] && [ -n "${port}" ]; then if [ "${steammaster}" == "true" ] || [ "${commandname}" == "DEV-QUERY-RAW" ]; then # Query external IP first as most liky to succeed. - 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}" --arg port3 "${port3}" 'if .response.servers != null then .response.servers[] | select((.gameport == ($port|tonumber) or .gameport == ($queryport|tonumber) or .gameport == ($port3|tonumber))) | .addr else empty end' | wc -l 2> /dev/null)" + masterserver="$(curl --connect-timeout 10 -m 3 -s "https://api.steampowered.com/ISteamApps/GetServersAtAddress/v0001?addr=${publicip}&format=json" | jq --arg port "${port}" --arg queryport "${queryport}" --arg port3 "${port3}" 'if .response.servers != null then .response.servers[] | select((.gameport == ($port|tonumber) or .gameport == ($queryport|tonumber) or .gameport == ($port3|tonumber))) | .addr else empty end' | wc -l 2> /dev/null)" if [ "${masterserver}" == "0" ]; then # Loop though server IP addresses if external IP fails. for queryip in "${queryips[@]}"; do diff --git a/lgsm/modules/info_messages.sh b/lgsm/modules/info_messages.sh index 8c601a654..22319cdbd 100644 --- a/lgsm/modules/info_messages.sh +++ b/lgsm/modules/info_messages.sh @@ -166,8 +166,8 @@ fn_info_message_server_resource() { echo -e "${lightblue}Link Speed:\t${default}${netlink}" fi echo -e "${lightblue}IP:\t${default}${ip}" - if [ "${ip}" != "${extip}" ]; then - echo -e "${lightblue}Internet IP:\t${default}${extip}" + if [ "${ip}" != "${publicip}" ]; then + echo -e "${lightblue}Internet IP:\t${default}${publicip}" fi } | column -s $'\t' -t } @@ -274,9 +274,9 @@ fn_info_message_gameserver() { echo -e "${lightblue}Server IP:\t${default}${ip}:${port}" # Internet ip - if [ -n "${extip}" ]; then - if [ "${ip}" != "${extip}" ]; then - echo -e "${lightblue}Internet IP:\t${default}${extip}:${port}" + if [ -n "${publicip}" ]; then + if [ "${ip}" != "${publicip}" ]; then + echo -e "${lightblue}Internet IP:\t${default}${publicip}:${port}" fi fi