From 766a99478be7d26a8225fa52a6f6c46ce0f95439 Mon Sep 17 00:00:00 2001 From: Matthew Saunders Brown Date: Mon, 12 Feb 2024 10:44:45 -0800 Subject: [PATCH] add exit code to validate_domain function --- sbin/pdns.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sbin/pdns.sh b/sbin/pdns.sh index 65b4019..e92b9aa 100755 --- a/sbin/pdns.sh +++ b/sbin/pdns.sh @@ -174,7 +174,7 @@ function pdns:getoptions () { fi if ! pdns::validate_domain $zone; then echo "ERROR: $zone is not a valid domain name." - exit + exit 1 fi ;; e ) # max (integer) – Maximum number of entries to return @@ -228,7 +228,7 @@ function pdns:getoptions () { fi if ! pdns::validate_domain $zone; then echo "ERROR: $zone is not a valid domain name." - exit + exit 1 fi ;; \? )