Answers for "how to setup letsencrypt automatic renewal"

0

how to setup letsencrypt automatic renewal

# Renew Let's Encrypt SSL cert
                                                                                                                                               

                                                                                                                                               
cd /opt/letsencrypt/
./letsencrypt-auto --config /etc/letsencrypt/cli.ini -d yourdomain.com -d www.yourdomain.com certonly
                                                                                                                                               
if [ $? -ne 0 ]
 then
        ERRORLOG=`tail /var/log/letsencrypt/letsencrypt.log`
        echo -e "The Lets Encrypt Cert has not been renewed! \n \n" $ERRORLOG | mail -s "Lets Encrypt Cert Alert" [email protected]
 else
        service apache2 reload
fi
                                                                                                                                               
exit 0
Posted by: Guest on February-25-2021

Browse Popular Code Answers by Language