From 4d28f068f0c977409477640f927b3880d2064817 Mon Sep 17 00:00:00 2001 From: Asif Bacchus Date: Thu, 13 Sep 2018 21:02:31 -0600 Subject: [PATCH] Reordered IP address section. Always display IP being used whether provided or detected. --- cfddns.sh | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/cfddns.sh b/cfddns.sh index 793eb2d..0f57fcd 100755 --- a/cfddns.sh +++ b/cfddns.sh @@ -192,12 +192,13 @@ if [ -z "$ipAddress" ]; then echo -e "\e[1;36m(set to IP6 mode)\e[0m" ipAddress=$(curl -s http://ipv6.icanhazip.com) fi + # check if curl reported any errors ipLookupResult=$(echo "$?") if [ "$ipLookupResult" -ne 0 ]; then quit 201 - else - echo -e "\e[0;36mUsing IP address: $ipAddress" fi +else + echo -e "\e[0;36mUsing IP address: $ipAddress" fi