From e58b2bf426fe102211a5af6a41178923c73bc120 Mon Sep 17 00:00:00 2001 From: tfasano1 <54379134+tfasano1@users.noreply.github.com> Date: Wed, 24 Jan 2024 10:25:42 -0500 Subject: [PATCH] exit when records aren't setup --- emailwiz.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/emailwiz.sh b/emailwiz.sh index d3212ab..b525e59 100644 --- a/emailwiz.sh +++ b/emailwiz.sh @@ -25,9 +25,9 @@ certdir="/etc/letsencrypt/live/$maildomain" # Preliminary record checks ipv4=$(host "$domain" | grep -m1 -Eo '([0-9]+\.){3}[0-9]+') -[ -z "$ipv4" ] && echo "\033[0;31mPlease point your domain ("$domain") to your server's ipv4 address." +[ -z "$ipv4" ] && echo "\033[0;31mPlease point your domain ("$domain") to your server's ipv4 address." && exit 1 ipv6=$(host "$domain" | grep "IPv6" | awk '{print $NF}') -[ -z "$ipv6" ] && echo "\033[0;31mPlease point your domain ("$domain") to your server's ipv6 address." +[ -z "$ipv6" ] && echo "\033[0;31mPlease point your domain ("$domain") to your server's ipv6 address." && exit 1 # Open required mail ports, and 80, for Certbot. for port in 80 993 465 25 587; do