From d979a425e1fbeb15ca8063ee73836c850a81b9d1 Mon Sep 17 00:00:00 2001 From: yumoqing Date: Fri, 23 Aug 2024 16:40:05 +0800 Subject: [PATCH] bugfix --- msp/certbot.sh | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 msp/certbot.sh 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