From cf820d777d26a9cb5f8239014f6203773b2fc970 Mon Sep 17 00:00:00 2001 From: Asif Bacchus Date: Fri, 7 May 2021 14:03:52 -0600 Subject: [PATCH] refactor: ip4 and ip6 mutual override - use the most recently specified option --- cfddns.posix.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cfddns.posix.sh b/cfddns.posix.sh index 8dff29e..5b3bf38 100644 --- a/cfddns.posix.sh +++ b/cfddns.posix.sh @@ -133,6 +133,7 @@ while [ $# -gt 0 ]; do -4 | --ip4 | --ipv4) # operate in IP4 mode (default) ip4=1 + ip6=0 ;; -6 | --ip6 | --ipv6) # operate in IP6 mode @@ -154,7 +155,6 @@ if ! command -v curl >/dev/null; then exit 2 fi [ -z "$dnsRecords" ] && badParam errMsg "You must specify at least one DNS record to update. Exiting." -[ "$ip4" -eq 1 ] && [ "$ip6" -eq 1 ] && badParam errMsg "Cannot operate in IP4 and IP6 modes simultaneously. Exiting." # turn off log file colourization if parameter is set if [ "$colourizeLogFile" -eq 0 ]; then bold=""