From c975f318993b291151b1ef908f218ab8c89b74e5 Mon Sep 17 00:00:00 2001 From: John D Pell Date: Thu, 23 Sep 2021 22:49:56 -0700 Subject: [PATCH] plugins/base: `myip()` --- plugins/available/base.plugin.bash | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/plugins/available/base.plugin.bash b/plugins/available/base.plugin.bash index f6c90d57..c10771a7 100644 --- a/plugins/available/base.plugin.bash +++ b/plugins/available/base.plugin.bash @@ -31,8 +31,7 @@ function myip() { group 'base' list=("http://myip.dnsomatic.com/" "http://checkip.dyndns.com/" "http://checkip.dyndns.org/") for url in "${list[@]}"; do - res="$(curl -fs "${url}")" - if [[ $? -eq 0 ]]; then + if res="$(curl -fs "${url}")"; then break; fi done