From 2882fa82ccc46d4e5783bd51cda0853d7d71b35c Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Thu, 10 Sep 2020 20:21:27 +0100 Subject: [PATCH] re order ip detecting logic --- lgsm/functions/check_ip.sh | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-) diff --git a/lgsm/functions/check_ip.sh b/lgsm/functions/check_ip.sh index 195c745b3..f1391c02e 100644 --- a/lgsm/functions/check_ip.sh +++ b/lgsm/functions/check_ip.sh @@ -23,18 +23,13 @@ getipwc=$(${ipcommand} -o -4 addr | awk '{print $4}' | grep -oe '\([0-9]\{1,3\}\ # If the IP variable has been set by user. if [ -n "${ip}" ]&&[ "${ip}" != "0.0.0.0" ]; then queryips=( "${ip}" ) -# If game server IP is set IP address in game config. -elif [ -n "${configip}" ]; then - # If config does not have an IP set. - if [ "${configip}" == "" ];then - queryips=( $(echo "${getip}") ) - ip="0.0.0.0" - # If config does have an IP set. - else + # If game config does have an IP set. +elif [ -n "${configip}" ];then queryips=( "${configip}" ) ip="${configip}" - fi -# If IP has not been set by user. + # If no ip is set by the user. else queryips=( $(echo "${getip}") ) + ip="0.0.0.0" +# If IP has not been set by user. fi