| 1234567891011121314151617181920 |
- #!/bin/bash
-
- docker stop production_nginx_1
-
- ### Get new keys
- sudo certbot renew
-
- ### Remove the old keys
- rm /proxy/nginx/keys/letsencrypt/old/letsencrypt*
-
- ### Deprecate and back up the current keys
- mv /opt/proxy/nginx/keys/letsencrypt* /opt/proxy/nginx/keys/old
-
- ### Copy over the new keys
- sudo cat /etc/letsencrypt/live/craftinamerica.org/fullchain.pem > /opt/proxy/nginx/keys/letsencrypt.crt
- sudo cat /etc/letsencrypt/live/craftinamerica.org/privkey.pem > /opt/proxy/nginx/keys/letsencrypt.key
- sudo cat /etc/letsencrypt/live/freehand.com/fullchain.pem > /opt/proxy/nginx/keys/letsencrypt-freehand.crt
- sudo cat /etc/letsencrypt/live/freehand.com/privkey.pem > /opt/proxy/nginx/keys/letsencrypt-freehand.key
-
- echo "RUN the ./rebuild.sh script now to move over the newly generated keys and restart the container"
|