From 06a6b151c991a059c54935268f4f788dbef3c1ef Mon Sep 17 00:00:00 2001 From: David Rabkin Date: Sun, 21 Jan 2024 19:17:44 +0200 Subject: [PATCH] myip: no need to hide the output, it runs quietly already --- app/myip | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/app/myip b/app/myip index 8f9954b..8ae6c49 100755 --- a/app/myip +++ b/app/myip @@ -9,7 +9,7 @@ # shellcheck disable=SC1091,SC2034 # File not following, appears unused. set -- "$@" --quiet readonly \ - BASE_APP_VERSION=0.9.20240102 \ + BASE_APP_VERSION=0.9.20240121 \ BASE_MIN_VERSION=0.9.20240102 . base.sh @@ -40,7 +40,7 @@ myip() { loge OpenDNS failed: "$ip" return 0 } - var_exists ip >/dev/null 2>&1 || { + var_exists ip || { ip="$( dig \ -4 \ @@ -54,7 +54,7 @@ myip() { return 0 } ip="$(printf %s "$ip" | awk -F\" '{print $2}')" - var_exists ip >/dev/null 2>&1 || { + var_exists ip || { loge OpenDNS and Google DNS failed to resolve my IP return 0 } @@ -70,13 +70,13 @@ myip() { awk -F':[ \t]+' 'tolower($1) ~ /^stateprov$/ {print toupper($2)}' | head -1 )" - var_exists state >/dev/null 2>&1 || { + var_exists state || { state="$( printf %s "$out" | awk -F':[ \t]+' 'tolower($1) ~ /^country$/ {print toupper($2)}' | head -1 )" - var_exists state >/dev/null 2>&1 || + var_exists state || state=NO } dur="$(chrono_get run)" || die