Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # Renew Let's Encrypt SSL
- cd /root/letsencrypt/
- ./letsencrypt-auto certonly -a webroot --renew-by-default --webroot-path /home/admin/web/becoder.org/public_html -d becoder.org
- 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" fuyuanli0625@gmail.com
- else
- service nginx restart
- service apache2 restart
- echo -e "The Lets Encrypt Cert has been renewed! \n \n" $ERRORLOG | mail -s "Lets Encrypt Cert Alert" fuyuanli0625@gmail.com
- fi
- exit 0
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement