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