Created
October 10, 2017 03:40
-
-
Save omartrigui/de6f499538bfc62022b9c059440cef41 to your computer and use it in GitHub Desktop.
Renew postfix certificate - Let's Encrypt cron
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
service nginx stop; | |
certbot auth --text --agree-tos --standalone --email [email protected] -d domain.com -d mail.domain.com --non-interactive --fo | |
rce-renewal; | |
service nginx start; | |
cat /etc/letsencrypt/live/domain.com/privkey.pem > /etc/postfix/postfix_default.pem; | |
cat /etc/letsencrypt/live/domain.com/fullchain.pem >> /etc/postfix/postfix_default.pem; | |
/usr/local/psa/admin/sbin/mailmng --restart-service; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment