bootstrap main site also

This commit is contained in:
f 2019-09-13 18:33:46 -03:00
parent 5df18ce97c
commit 5d3d7ce80e
No known key found for this signature in database
GPG key ID: 2AE5A13E321F953D

View file

@ -5,15 +5,17 @@ case $1 in
# Renew certificates, trust in certbot's algorithms
renew) /usr/bin/certbot renew --quit --agree-tos ;;
bootstrap)
test -d "/etc/letsencrypt/live/api.${SUTTY}" && exit 0
for site in ${SUTTY} api.${SUTTY}; do
test -d "/etc/letsencrypt/live/${site}" && exit 0
# Get the certificate for the domain, the webserver will need
# access to this directory
/usr/bin/certbot certonly --email "certbot@${SUTTY}" \
--webroot \
--agree-tos \
--webroot-path /var/lib/letsencrypt \
-d "api.${SUTTY}" ;;
# Get the certificate for the domain, the webserver will need
# access to this directory
/usr/bin/certbot certonly --email "certbot@${SUTTY}" \
--webroot \
--agree-tos \
--webroot-path /var/lib/letsencrypt \
-d "${site}"
done ;;
# Generate certificates
*)
# Save headers here