From 1301a6667128ed8d5c583670c4a8afdcb8987fab Mon Sep 17 00:00:00 2001 From: Justine Smithies Date: Mon, 1 Jul 2024 20:08:17 +0100 Subject: Updated dig lines --- .config/eww/scripts/network.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to '.config/eww/scripts') diff --git a/.config/eww/scripts/network.sh b/.config/eww/scripts/network.sh index cceebd7..e4f36fa 100755 --- a/.config/eww/scripts/network.sh +++ b/.config/eww/scripts/network.sh @@ -14,11 +14,11 @@ function ShowInfo { if [ "$(nmcli connection show --active | grep -oh "\w*ethernet\w*")" == "ethernet" ]; then - wan="$(dig +short myip.opendns.com @resolver1.opendns.com)" + wan="$(dig @resolver4.opendns.com myip.opendns.com +short)" connection="$(nmcli connection show --active | grep 'ethernet' | awk '{ print $6 }' FS=' '): $(nmcli connection show --active | grep 'ethernet' | awk '{ print $1 }' FS=' ') - $(nmcli -t -f IP4.ADDRESS dev show $(nmcli connection show --active | grep 'ethernet' | awk '{ print $6 }' FS=' ') | awk '{print $2}' FS='[:/]') WAN IP: $wan" elif [ "$(nmcli connection show --active | grep -oh "\w*wifi\w*")" == "wifi" ]; then - wan="$(dig +short myip.opendns.com @resolver1.opendns.com)" + wan="$(dig @resolver4.opendns.com myip.opendns.com +short)" connection="$(nmcli connection show --active | grep 'wifi' | awk '{ print $4 }' FS=' '): $(nmcli connection show --active | grep 'wifi' | awk '{ print $1 }' FS=' ') - $(nmcli -t -f IP4.ADDRESS dev show $(nmcli connection show --active | grep 'wifi' | awk '{ print $4 }' FS=' ') | awk '{print $2}' FS='[:/]') WAN IP: $wan" else -- cgit v1.2.3