letsencrypt permissions when renewing
This commit is contained in:
parent
21ab3ceb5f
commit
185b872d3e
|
@ -232,9 +232,14 @@ function add_cert_letsencrypt {
|
||||||
# stop the web server
|
# stop the web server
|
||||||
systemctl stop nginx
|
systemctl stop nginx
|
||||||
|
|
||||||
|
chgrp -R root /etc/letsencrypt
|
||||||
|
chmod -R 777 /etc/letsencrypt
|
||||||
|
|
||||||
certbot certonly -n --server $LETSENCRYPT_SERVER --standalone -d $LETSENCRYPT_HOSTNAME --renew-by-default --agree-tos --email $MY_EMAIL_ADDRESS
|
certbot certonly -n --server $LETSENCRYPT_SERVER --standalone -d $LETSENCRYPT_HOSTNAME --renew-by-default --agree-tos --email $MY_EMAIL_ADDRESS
|
||||||
if [ ! "$?" = "0" ]; then
|
if [ ! "$?" = "0" ]; then
|
||||||
echo $"Failed to install letsencrypt for domain $LETSENCRYPT_HOSTNAME"
|
echo $"Failed to install letsencrypt for domain $LETSENCRYPT_HOSTNAME"
|
||||||
|
chgrp -R ssl-cert /etc/letsencrypt
|
||||||
|
chmod -R g=rX /etc/letsencrypt
|
||||||
systemctl start nginx
|
systemctl start nginx
|
||||||
exit 63216
|
exit 63216
|
||||||
fi
|
fi
|
||||||
|
|
Loading…
Reference in New Issue