remove leading / in duplicate check

This commit is contained in:
2023-02-14 13:48:43 +00:00
parent aa6a84090a
commit 8c59ed2ce9

View File

@@ -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;