Нет описания
Вы не можете выбрать более 25 тем Темы должны начинаться с буквы или цифры, могут содержать дефисы(-) и должны содержать не более 35 символов.

etc_cron-monthly_letsencrypt-renew 713B

123456789101112131415161718192021
  1. #!/bin/bash
  2. # Renew all live certificates with LetsEncrypt. This needs to run at least
  3. # once every three months.
  4. # Given a certificate file returns "domain1,domain2"
  5. # https://community.letsencrypt.org/t/help-me-understand-renewal-config/7115
  6. function getDomains() {
  7. openssl x509 -text -in "$1" |
  8. grep -A1 "Subject Alternative Name:" | tail -n1 |
  9. tr -d ' ' | tr -d 'DNS:'
  10. }
  11. service apache2 stop
  12. for c in `ls /etc/letsencrypt/live`; do
  13. domains=$(getDomains /etc/letsencrypt/live/$c/cert.pem)
  14. /root/letsencrypt/letsencrypt-auto --renew certonly -c /etc/letsencrypt/cli.conf --domains=$domains
  15. done
  16. service apache2 start
  17. # Services that rely on LE certificates will need restarted.