Browse Source

letsencrypt permissions when renewing

Bob Mottram 7 years ago
parent
commit
185b872d3e
1 changed files with 5 additions and 0 deletions
  1. 5
    0
      src/freedombone-addcert

+ 5
- 0
src/freedombone-addcert View File

@@ -232,9 +232,14 @@ function add_cert_letsencrypt {
232 232
     # stop the web server
233 233
     systemctl stop nginx
234 234
 
235
+    chgrp -R root /etc/letsencrypt
236
+    chmod -R 777 /etc/letsencrypt
237
+
235 238
     certbot certonly -n --server $LETSENCRYPT_SERVER --standalone -d $LETSENCRYPT_HOSTNAME --renew-by-default --agree-tos --email $MY_EMAIL_ADDRESS
236 239
     if [ ! "$?" = "0" ]; then
237 240
         echo $"Failed to install letsencrypt for domain $LETSENCRYPT_HOSTNAME"
241
+        chgrp -R ssl-cert /etc/letsencrypt
242
+        chmod -R g=rX /etc/letsencrypt
238 243
         systemctl start nginx
239 244
         exit 63216
240 245
     fi