Merge pull request #1552 from rico-chet/detect-http-errors-in-myip
plugins/base: Detect HTTP errors in `myip()`
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user