From 9201b9f7c974b280377e567faaa3bd02fcbe8c34 Mon Sep 17 00:00:00 2001 From: Leonardo Custodio Date: Mon, 20 Jan 2025 18:40:34 +0400 Subject: [PATCH] Update start.sh Signed-off-by: Leonardo Custodio --- start.sh | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/start.sh b/start.sh index 08e7f61..20a9d98 100755 --- a/start.sh +++ b/start.sh @@ -55,10 +55,13 @@ read_email() { fi # Check if the email address is valid - if ! [[ $NOTIFICATION_EMAIL =~ ^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}$ ]]; then - echo "The email address you provided is not valid. Please try again." - read_email - fi + case $NOTIFICATION_EMAIL in + *@?*.?*) ;; # Valid pattern + *) + echo "The email address you provided is not valid. Please try again." + read_email + ;; + esac } check_has_upgrade_notification_email() {