You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

123456789101112131415161718
  1. #!/bin/bash
  2. docker stop production_nginx_1
  3. ### Get new keys
  4. sudo certbot renew
  5. ### Remove the old keys
  6. rm ~/production/nginx/keys/letsencrypt/old/letsencrypt.*
  7. ### Deprecate and back up the current keys
  8. mv ~/production/nginx/keys/letsencrypt.* ~/production/nginx/keys/old
  9. ### Copy over the new keys
  10. sudo cat /etc/letsencrypt/live/<CHANGE_ME>/fullchain.pem > ~/production/nginx/keys/letsencrypt.crt
  11. sudo cat /etc/letsencrypt/live/<CHANGE_ME>/privkey.pem > ~/production/nginx/keys/letsencrypt.key
  12. echo "RUN the ./rebuild.sh script now to move over the newly generated keys and restart the container"