mirror of
https://github.com/nextcloud/vm.git
synced 2025-10-26 11:27:32 +00:00
fix IP check
in some cases resolv.conf doesn't resolv correctly when using dig.
This commit is contained in:
parent
f1e778c0f1
commit
131df12fe5
2
lib.sh
2
lib.sh
@ -41,7 +41,7 @@ IFACE=$(ip r | grep "default via" | awk '{print $5}')
|
||||
IFACE2=$(ip -o link show | awk '{print $2,$9}' | grep 'UP' | cut -d ':' -f 1)
|
||||
REPO=$(grep "^deb " /etc/apt/sources.list | grep http | awk '{print $2}' | head -1)
|
||||
ADDRESS=$(hostname -I | cut -d ' ' -f 1)
|
||||
WANIP4=$(dig +short myip.opendns.com @resolver1.opendns.com)
|
||||
WANIP4=$(curl -s -k -m 5 -4 https://api64.ipify.org)
|
||||
INTERFACES="/etc/netplan/nextcloud.yaml"
|
||||
GATEWAY=$(ip route | grep default | awk '{print $3}')
|
||||
# Internet DNS required when a check needs to be made to a server outside the home/SME
|
||||
|
||||
Loading…
Reference in New Issue
Block a user