您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符

renew_keys.sh 807B

1234567891011121314151617181920
  1. #!/bin/bash
  2. docker stop nginx-proxy
  3. ### Get new keys
  4. sudo certbot renew
  5. ### Remove the old keys
  6. rm /proxy/nginx/keys/old/letsencrypt*
  7. ### Deprecate and back-up the current keys
  8. mv /opt/proxy/nginx/keys/letsencrypt* /opt/proxy/nginx/keys/old/
  9. ### Copy over the new keys
  10. sudo cat /etc/letsencrypt/live/craftinamerica.org/fullchain.pem > /opt/proxy/nginx/keys/letsencrypt.crt
  11. sudo cat /etc/letsencrypt/live/craftinamerica.org/privkey.pem > /opt/proxy/nginx/keys/letsencrypt.key
  12. sudo cat /etc/letsencrypt/live/freehand.com/fullchain.pem > /opt/proxy/nginx/keys/letsencrypt-freehand.crt
  13. sudo cat /etc/letsencrypt/live/freehand.com/privkey.pem > /opt/proxy/nginx/keys/letsencrypt-freehand.key
  14. echo "RUN the ./rebuild_production.sh script now to move over the newly generated keys and restart the container"