Skip to content

Instantly share code, notes, and snippets.

@sdn3098
sdn3098 / ssl-letsencrypt-auto-renew.sh
Created March 13, 2022 17:40 — forked from oodavid/ssl-letsencrypt-auto-renew.sh
Automatically renew letsencrypt SSL certificates via cron.
#!/bin/bash
# Source
# https://gist.github.com/oodavid/54cadfb92ff49618797d
# Adapted from
# https://www.digitalocean.com/community/tutorials/how-to-secure-nginx-with-let-s-encrypt-on-ubuntu-14-04
# Make sure this is added to the crontab, ie:
# sudo crontab -e
# 30 2 * * 1 /home/ubuntu/khan-draw/ssl-letsencrypt-auto-renew.sh >> /var/log/ssl-letsencrypt-auto-renew.log
# Config