diff options
Diffstat (limited to 'scripts')
-rwxr-xr-x | scripts/.scripts/ip.sh | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/scripts/.scripts/ip.sh b/scripts/.scripts/ip.sh new file mode 100755 index 0000000..547c451 --- /dev/null +++ b/scripts/.scripts/ip.sh @@ -0,0 +1,11 @@ +#!/bin/bash +# sudo apt install dnsutils jq && sudo -H pip3 install speedtest-cli + +myip=$(dig +short myip.opendns.com @resolver1.opendns.com) +geoip=$(curl -s ipinfo.io/"$myip" | jq -r '[.country, .city] | join(", ")') + +echo "$myip ($geoip)" +speedtest-cli --simple --secure + +exit 0 + |