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/網域/public_html -d 網域
- cat /etc/letsencrypt/live/網域/cert.pem /etc/letsencrypt/live/網域/chain.pem > /usr/local/vesta/ssl/certificate.crt
- 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" mail@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" mail@gmail.com
- fi
- exit 0
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement