install_certbot_dnsimple_plugin.sh
· 658 B · Bash
Originalformat
#!/bin/sh
apt install python3 python3-dev python3-venv libaugeas-dev gcc
python3 -m venv /opt/certbot/
/opt/certbot/bin/pip install --upgrade pip
/opt/certbot/bin/pip install certbot certbot-nginx
ln -s /opt/certbot/bin/certbot /usr/local/bin/certbot
/opt/certbot/bin/pip install certbot-dns-dnsimple
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
# To generate certificate:
# /opt/certbot/bin/certbot --dns-dnsimple-credentials /etc/letsencrypt/dnsimple.ini --dns-dnsimple certonly -d <hostname>.danbee.in
| 1 | #!/bin/sh |
| 2 | |
| 3 | apt install python3 python3-dev python3-venv libaugeas-dev gcc |
| 4 | |
| 5 | python3 -m venv /opt/certbot/ |
| 6 | /opt/certbot/bin/pip install --upgrade pip |
| 7 | /opt/certbot/bin/pip install certbot certbot-nginx |
| 8 | |
| 9 | ln -s /opt/certbot/bin/certbot /usr/local/bin/certbot |
| 10 | |
| 11 | /opt/certbot/bin/pip install certbot-dns-dnsimple |
| 12 | |
| 13 | echo "0 0,12 * * * root /opt/certbot/bin/python \ |
| 14 | -c 'import random; import time; time.sleep(random.random() * 3600)' \ |
| 15 | && sudo certbot renew -q" \ |
| 16 | | sudo tee -a /etc/crontab > /dev/null |
| 17 | |
| 18 | # To generate certificate: |
| 19 | # /opt/certbot/bin/certbot --dns-dnsimple-credentials /etc/letsencrypt/dnsimple.ini --dns-dnsimple certonly -d <hostname>.danbee.in |