Merge pull request #1552 from rico-chet/detect-http-errors-in-myip

plugins/base: Detect HTTP errors in `myip()`
pull/1545/head
Nils Winkler 2020-04-08 09:17:34 +02:00 committed by GitHub
commit 7945415334
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -32,7 +32,7 @@ function myip ()
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[*]} for url in ${list[*]}
do do
res=$(curl -s "${url}") res=$(curl -fs "${url}")
if [ $? -eq 0 ];then if [ $? -eq 0 ];then
break; break;
fi fi