From 61b57218a8cf8d9437b816fe3c006c4cc3021c3b Mon Sep 17 00:00:00 2001 From: DarkPhoenix2704 Date: Thu, 22 Aug 2024 14:28:34 +0530 Subject: [PATCH] fix: minio ssl not asking fix: spacing fix: regex --- docker-compose/setup-script/noco.sh | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/docker-compose/setup-script/noco.sh b/docker-compose/setup-script/noco.sh index 18a4761b4d..f1b0672d98 100755 --- a/docker-compose/setup-script/noco.sh +++ b/docker-compose/setup-script/noco.sh @@ -59,7 +59,7 @@ print_box_message() { command_exists() { command -v "$1" >/dev/null 2>&1; } is_valid_domain() { - local domain_regex="^([a-zA-Z0-9]([-a-zA-Z0-9]{0,61}[a-zA-Z0-9])?\.)+[a-zA-Z]{2,}$" + local domain_regex="^([a-zA-Z0-9]([-a-zA-Z0-9]{0,61}[a-zA-Z0-9])?\.)*[a-zA-Z0-9]([-a-zA-Z0-9]{0,61}[a-zA-Z0-9])?\.[a-zA-Z]{2,}$" [[ "$1" =~ $domain_regex ]] } @@ -449,7 +449,7 @@ get_advanced_options() { if [ "$CONFIG_MINIO_ENABLED" = "Y" ] || [ "$CONFIG_MINIO_ENABLED" = "y" ]; then CONFIG_MINIO_DOMAIN_NAME=$(prompt "Enter the MinIO domain name" "minio") - if is_valid_domain "CONFIG_MINIO_DOMAIN_NAME"; then + if is_valid_domain "$CONFIG_MINIO_DOMAIN_NAME"; then if confirm "Do you want to configure SSL for $CONFIG_MINIO_DOMAIN_NAME?"; then CONFIG_MINIO_SSL_ENABLED="Y" else @@ -565,11 +565,11 @@ EOF # If SSL is enabled we need to add the following lines to the traefik service if [ "$CONFIG_SSL_ENABLED" = "Y" ]; then cat >> "$compose_file" <