fix permissions and domains

This commit is contained in:
f 2019-09-13 17:10:50 -03:00
parent 44ba4c78de
commit 5df18ce97c
No known key found for this signature in database
GPG key ID: 2AE5A13E321F953D

View file

@ -31,7 +31,7 @@ case $1 in
| jq --raw-output .[] \ | jq --raw-output .[] \
| while read name; do | while read name; do
# If the site name doesn't end with a dot, it's a subdomain # If the site name doesn't end with a dot, it's a subdomain
domain="$(echo "${name}" | sed "s/[^\.]$/&${SUTTY}/")" domain="$(echo "${name}" | sed "s/[^\.]$/&.${SUTTY}/")"
domain="${domain%.}" domain="${domain%.}"
# Skip already existing domains # Skip already existing domains
@ -45,4 +45,9 @@ case $1 in
--webroot-path /var/lib/letsencrypt \ --webroot-path /var/lib/letsencrypt \
-d "${domain}" -d "${domain}"
done done
# Fix permissions, users in group ssl have read access
find /etc/letsencrypt -type d | xargs -r chmod 2750
find /etc/letsencrypt -type f | xargs -r chmod 640
chgrp -R ssl /etc/letsencrypt
esac esac