選択できるのは25トピックまでです。 トピックは、先頭が英数字で、英数字とダッシュ('-')を使用した35文字以内のものにしてください。

renew_keys.sh 603B

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"