From 6e86686cf32c8aae9e2995e139ea5933d2b10a17 Mon Sep 17 00:00:00 2001 From: OniriCorpe Date: Thu, 28 Dec 2023 07:29:07 +0100 Subject: [PATCH] fix --- scripts/_common.sh | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/scripts/_common.sh b/scripts/_common.sh index fe0c172..2e95dd2 100644 --- a/scripts/_common.sh +++ b/scripts/_common.sh @@ -77,8 +77,10 @@ process_ips(){ ip=$(echo "$ips" | awk "{print \$$i}") # check if the so-called IP really is one if ynh_validate_ip4 --ip_address="$ip" || ynh_validate_ip6 --ip_address="$ip"; then - # if the IP is public and the user doesn't want to expose port 53, skip it - if ! is_public_ip "$ip" && ! [ "$open_port_53" == "false" ] ; then + # don't process if the IP is public and the port 53 closed + if is_public_ip "$ip" && [ "$open_port_53" == "false" ] ; then + exit 1 + else if [[ "${is_install:-}" = true ]]; then # to get a dash before each IP processed_ips+="- $ip "