Browse Source

public ip

pull/4510/head
Daniel Gibbs 1 year ago
parent
commit
fcdea9c28e
No known key found for this signature in database GPG Key ID: 2076B128385E8C55
  1. 8
      lgsm/modules/check_ip.sh

8
lgsm/modules/check_ip.sh

@ -38,25 +38,25 @@ function fn_is_valid_ip() {
# If the IP variable has been set by user. # If the IP variable has been set by user.
if fn_is_valid_ip "${ip}"; then if fn_is_valid_ip "${ip}"; then
queryips=("${ip}") queryips=("${ip}" "${publicip}")
httpip=("${ip}") httpip=("${ip}")
telnetip=("${ip}") telnetip=("${ip}")
# If the game config has an IP set. # If the game config has an IP set.
elif fn_is_valid_ip "${configip}"; then elif fn_is_valid_ip "${configip}"; then
queryips=("${configip}") queryips=("${configip}" "${publicip}")
ip="${configip}" ip="${configip}"
httpip=("${configip}") httpip=("${configip}")
telnetip=("${configip}") telnetip=("${configip}")
# If there is only 1 server IP address. # If there is only 1 server IP address.
# Some IP details can automatically use the one IP. # Some IP details can automatically use the one IP.
elif [ "${#current_ips[@]}" == "1" ]; then elif [ "${#current_ips[@]}" == "1" ]; then
queryips=("127.0.0.1" "${current_ips[@]}") queryips=("127.0.0.1" "${current_ips[@]}" "${publicip}")
ip="0.0.0.0" ip="0.0.0.0"
httpip=("${current_ips[@]}") httpip=("${current_ips[@]}")
telnetip=("${current_ips[@]}") telnetip=("${current_ips[@]}")
# If no ip is set by the user and server has more than one IP. # If no ip is set by the user and server has more than one IP.
else else
queryips=("127.0.0.1" "${current_ips[@]}") queryips=("127.0.0.1" "${current_ips[@]}" "${publicip}")
ip="0.0.0.0" ip="0.0.0.0"
httpip=("${ip}") httpip=("${ip}")
telnetip=("${ip}") telnetip=("${ip}")

Loading…
Cancel
Save