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

plugins/base: Detect HTTP errors in `myip()`
This commit is contained in:
Nils Winkler
2020-04-08 09:17:34 +02:00
committed by GitHub

View File

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