From: AJ ONeal Date: Mon, 26 Apr 2021 07:05:00 +0000 (+0000) Subject: bugfix: add missing variable $ prefix X-Git-Url: https://git.josue.xyz/?a=commitdiff_plain;h=2073a1eeebdcd30ffaddaf40e7c4940361bd5a08;p=webi-installers%2F.git bugfix: add missing variable $ prefix --- diff --git a/myip/myip.sh b/myip/myip.sh index ca57d6c..cc60be7 100644 --- a/myip/myip.sh +++ b/myip/myip.sh @@ -11,11 +11,11 @@ function __show_my_ip { echo "IPv4 (A) : $ipv4" fi - if [[ -n $ipv6 ]] && [[ "ipv6" != "ipv4" ]]; then - echo "IPv6 (AAAA): $ipv6" + if [[ -n ${ipv6} ]] && [[ ${ipv6} != "${ipv4}" ]]; then + echo "IPv6 (AAAA): ${ipv6}" fi - if [[ -z $ipv4 ]] && [[ -z "ipv6" ]]; then + if [[ -z ${ipv4} ]] && [[ -z ${ipv6} ]]; then echo >&2 "error: no public IP address" fi }