Browse Source

re order ip detecting logic

pull/3015/head
Daniel Gibbs 5 years ago
parent
commit
2882fa82cc
  1. 13
      lgsm/functions/check_ip.sh

13
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.
# If game config does have an IP set.
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
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

Loading…
Cancel
Save