Daniel Gibbs
1 year ago
No known key found for this signature in database
GPG Key ID: 2076B128385E8C55
1 changed files with
4 additions and
4 deletions
-
lgsm/modules/check_ip.sh
|
|
@ -38,25 +38,25 @@ function fn_is_valid_ip() { |
|
|
|
|
|
|
|
# If the IP variable has been set by user. |
|
|
|
if fn_is_valid_ip "${ip}"; then |
|
|
|
queryips=("${ip}") |
|
|
|
queryips=("${ip}" "${publicip}") |
|
|
|
httpip=("${ip}") |
|
|
|
telnetip=("${ip}") |
|
|
|
# If the game config has an IP set. |
|
|
|
elif fn_is_valid_ip "${configip}"; then |
|
|
|
queryips=("${configip}") |
|
|
|
queryips=("${configip}" "${publicip}") |
|
|
|
ip="${configip}" |
|
|
|
httpip=("${configip}") |
|
|
|
telnetip=("${configip}") |
|
|
|
# If there is only 1 server IP address. |
|
|
|
# Some IP details can automatically use the one IP. |
|
|
|
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" |
|
|
|
httpip=("${current_ips[@]}") |
|
|
|
telnetip=("${current_ips[@]}") |
|
|
|
# If no ip is set by the user and server has more than one IP. |
|
|
|
else |
|
|
|
queryips=("127.0.0.1" "${current_ips[@]}") |
|
|
|
queryips=("127.0.0.1" "${current_ips[@]}" "${publicip}") |
|
|
|
ip="0.0.0.0" |
|
|
|
httpip=("${ip}") |
|
|
|
telnetip=("${ip}") |
|
|
|