From 8c59ed2ce93f5001d6e078d6032959ad95eaeb9d Mon Sep 17 00:00:00 2001 From: hael Date: Tue, 14 Feb 2023 13:48:43 +0000 Subject: [PATCH] remove leading / in duplicate check --- scripts/nginx_config_create.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/nginx_config_create.sh b/scripts/nginx_config_create.sh index 5cc050f..ca22efd 100755 --- a/scripts/nginx_config_create.sh +++ b/scripts/nginx_config_create.sh @@ -58,7 +58,7 @@ add_location() { ALP_LOCAL_ALLOWED_NETWORK=$(echo $ALP | jq -rc '.LOCAL_ALLOWED_NETWORK | select(.!="null") | join(" ")'); # do not duplicate locations - EXISTS=$(grep -rn "location /$ALP_LOCAL_PATH {" -m 1 $DOMAIN_NAME.conf); + EXISTS=$(grep -rn "location $ALP_LOCAL_PATH {" -m 1 $DOMAIN_NAME.conf); if [ -n "$EXISTS" ]; then # skip if exists continue;