plugins/base: `myip()`

pull/1930/head
John D Pell 2021-09-23 22:49:56 -07:00
parent 41ef92bd1e
commit c975f31899
1 changed files with 1 additions and 2 deletions

View File

@ -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