Merge pull request #1552 from rico-chet/detect-http-errors-in-myip
plugins/base: Detect HTTP errors in `myip()`pull/1545/head
commit
7945415334
|
|
@ -32,7 +32,7 @@ function myip ()
|
|||
list=("http://myip.dnsomatic.com/" "http://checkip.dyndns.com/" "http://checkip.dyndns.org/")
|
||||
for url in ${list[*]}
|
||||
do
|
||||
res=$(curl -s "${url}")
|
||||
res=$(curl -fs "${url}")
|
||||
if [ $? -eq 0 ];then
|
||||
break;
|
||||
fi
|
||||
|
|
|
|||
Loading…
Reference in New Issue