Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
source /opt/python/current/env
# set domain name in the environment variable as DOMAIN
# echo $DOMAIN
CERT_FILE=/etc/letsencrypt/live/$DOMAIN/cert.pem
if test -f "$CERT_FILE"; then
exit
fi
wget https://dl.eff.org/certbot-auto
sudo mv certbot-auto /usr/local/bin/certbot-auto
sudo chown root /usr/local/bin/certbot-auto
sudo chmod 0755 /usr/local/bin/certbot-auto
sudo /usr/local/bin/certbot-auto --no-bootstrap
sudo /usr/local/bin/supervisorctl -c /opt/python/etc/supervisord.conf stop httpd
sudo /usr/local/bin/certbot-auto certonly --standalone -m info@example.com --agree-tos -d $DOMAIN -n
sudo /usr/local/bin/supervisorctl -c /opt/python/etc/supervisord.conf start httpd
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment