Changing WAN call in geo
This commit is contained in:
parent
4d492634bb
commit
3ce9c558c2
4
geo/geo
4
geo/geo
|
@ -66,7 +66,7 @@ version() {
|
||||||
|
|
||||||
# Fetches WAN ip address
|
# Fetches WAN ip address
|
||||||
wan_search() {
|
wan_search() {
|
||||||
dig +short myip.opendns.com @resolver1.opendns.com
|
httpGet https://api.ipify.org?format=json | grep -Eo "[0-9.]*"
|
||||||
}
|
}
|
||||||
|
|
||||||
# Fetches current LAN ip address
|
# Fetches current LAN ip address
|
||||||
|
@ -186,7 +186,7 @@ optspec="uwlrdm:go:a:vh*:"
|
||||||
while getopts "$optspec" optchar
|
while getopts "$optspec" optchar
|
||||||
do
|
do
|
||||||
case "${optchar}" in
|
case "${optchar}" in
|
||||||
w) wan_search ;;
|
w) getConfiguredClient && checkInternet && wan_search || exit 1;;
|
||||||
l) lan_search ;;
|
l) lan_search ;;
|
||||||
r) router_search ;;
|
r) router_search ;;
|
||||||
d) dns_search ;;
|
d) dns_search ;;
|
||||||
|
|
Loading…
Reference in New Issue