www
This commit is contained in:
parent
5d3d7ce80e
commit
dc5856cb03
1 changed files with 12 additions and 9 deletions
|
@ -36,8 +36,10 @@ case $1 in
|
||||||
domain="$(echo "${name}" | sed "s/[^\.]$/&.${SUTTY}/")"
|
domain="$(echo "${name}" | sed "s/[^\.]$/&.${SUTTY}/")"
|
||||||
domain="${domain%.}"
|
domain="${domain%.}"
|
||||||
|
|
||||||
|
# Generate a certificate for www also
|
||||||
|
for d in ${domain} www.${domain}; do
|
||||||
# Skip already existing domains
|
# Skip already existing domains
|
||||||
test -d "/etc/letsencrypt/live/${domain}" && continue
|
test -d "/etc/letsencrypt/live/${d}" && continue
|
||||||
|
|
||||||
# Get the certificate for the domain, the webserver will need
|
# Get the certificate for the domain, the webserver will need
|
||||||
# access to this directory
|
# access to this directory
|
||||||
|
@ -45,7 +47,8 @@ case $1 in
|
||||||
--webroot \
|
--webroot \
|
||||||
--agree-tos \
|
--agree-tos \
|
||||||
--webroot-path /var/lib/letsencrypt \
|
--webroot-path /var/lib/letsencrypt \
|
||||||
-d "${domain}"
|
-d "${d}"
|
||||||
|
done
|
||||||
done
|
done
|
||||||
|
|
||||||
# Fix permissions, users in group ssl have read access
|
# Fix permissions, users in group ssl have read access
|
||||||
|
|
Loading…
Reference in a new issue