fix(install_site): 1 cert per URL

This commit is contained in:
ange 2024-02-08 15:04:26 +01:00
parent d49c066585
commit ca151023d4
Signed by: ange
GPG Key ID: 9E0C4157BB7BEB1D

View File

@ -1,21 +1,15 @@
#!/bin/bash -e
CERTBOTCMD=(
for URL in $BASE_URL $OTHER_URLS; do
certbot certonly -n
--webroot
-w /var/www/certbot/
--agree-tos
--no-eff-email
-m "$EMAIL"
-d "$BASE_URL"
)
for URL in $OTHER_URLS; do
CERTBOTCMD+=(-d "$URL")
--webroot
-w /var/www/certbot/
--agree-tos
--no-eff-email
-m "$EMAIL"
-d "$URL"
done
"${CERTBOTCMD[@]}"
for f in *; do
envsubst "$(env | xargs printf '$%s ')" < "$f" > "/sites/$f"
done