Update init-letsencrypt.sh (#1380)

Add ability to accept a `.ev.nginx` configuration that lists a subdomain.
This commit is contained in:
Keiron Stoddart 2024-06-04 12:38:01 -05:00 committed by GitHub
parent 8b10535c93
commit b6d0ecec4f
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -21,7 +21,13 @@ docker_compose_cmd() {
# Assign appropriate Docker Compose command
COMPOSE_CMD=$(docker_compose_cmd)
domains=("$DOMAIN" "www.$DOMAIN")
# Only add www to domain list if domain wasn't explicitly set as a subdomain
if [[ ! $DOMAIN == www.* ]]; then
domains=("$DOMAIN" "www.$DOMAIN")
else
domains=("$DOMAIN")
fi
rsa_key_size=4096
data_path="../data/certbot"
email="$EMAIL" # Adding a valid address is strongly recommended