Let's Encrypt auto refresh script

Aus Carl-Christian Sautter - Wiki
Wechseln zu: Navigation, Suche

Script

#!/bin/sh
if ! /opt/letsencrypt/letsencrypt-auto renew >> /var/log/letsencrypt/renew.log 2>&1 ; then
    echo "Automated renewal failed" >> /var/log/letsencrypt/renew.log:
#    cat /var/log/letsencrypt/renew.log
    exit 1
fi
service apache2 reload >> /var/log/letsencrypt/renew.log 2>&1 ;

Crontab

# Refresh Letsencrypt Cert
3 22 * * 6 /opt/letsencrypt/renew.sh