diff --git a/msp/certbot.sh b/msp/certbot.sh new file mode 100644 index 0000000..ad3d7d5 --- /dev/null +++ b/msp/certbot.sh @@ -0,0 +1,9 @@ +sudo apt update +sudo apt install python3 python3-venv libaugeas0 +sudo apt-get remove certbot +sudo python3 -m venv /opt/certbot/ +sudo /opt/certbot/bin/pip install --upgrade pip +sudo /opt/certbot/bin/pip install certbot certbot-nginx +sudo ln -s /opt/certbot/bin/certbot /usr/bin/certbot +sudo certbot --nginx +echo "0 0,12 * * * root /opt/certbot/bin/python -c 'import random; import time; time.sleep(random.random() * 3600)' && sudo certbot renew -q" | sudo tee -a /etc/crontab > /dev/null