plugins/base: `myip()`
parent
41ef92bd1e
commit
c975f31899
|
|
@ -31,8 +31,7 @@ function myip() {
|
||||||
group 'base'
|
group 'base'
|
||||||
list=("http://myip.dnsomatic.com/" "http://checkip.dyndns.com/" "http://checkip.dyndns.org/")
|
list=("http://myip.dnsomatic.com/" "http://checkip.dyndns.com/" "http://checkip.dyndns.org/")
|
||||||
for url in "${list[@]}"; do
|
for url in "${list[@]}"; do
|
||||||
res="$(curl -fs "${url}")"
|
if res="$(curl -fs "${url}")"; then
|
||||||
if [[ $? -eq 0 ]]; then
|
|
||||||
break;
|
break;
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue