X-Git-Url: https://git.josue.xyz/?a=blobdiff_plain;f=myip%2Fmyip.sh;h=cc60be770e618fddc6e7cd4cfb40d12b43c92e0f;hb=aa61db993471a5ec35fadbc050126735b9fc200a;hp=ca57d6c493ba5ceab3a72dc07741c27393817b9a;hpb=46445e9382905a52e770d44191235be179616049;p=webi-installers%2F.git 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 }