Advertisement
Guest User

Untitled

a guest
Dec 28th, 2015
70
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.59 KB | None | 0 0
  1. # Renew Let's Encrypt SSL
  2.  
  3. cd /root/letsencrypt/
  4. ./letsencrypt-auto certonly -a webroot --renew-by-default --webroot-path /home/admin/web/becoder.org/public_html -d becoder.org
  5.  
  6. if [ $? -ne 0 ]
  7. then
  8. ERRORLOG=`tail /var/log/letsencrypt/letsencrypt.log`
  9. echo -e "The Lets Encrypt Cert has not been renewed! \n \n" $ERRORLOG | mail -s "Lets Encrypt Cert Alert" fuyuanli0625@gmail.com
  10. else
  11. service nginx restart
  12. service apache2 restart
  13. echo -e "The Lets Encrypt Cert has been renewed! \n \n" $ERRORLOG | mail -s "Lets Encrypt Cert Alert" fuyuanli0625@gmail.com
  14. fi
  15.  
  16. exit 0
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement