renew-ssl.sh 421 B

12345678910111213141516
  1. #!/bin/bash
  2. #
  3. # renew certbot ssl certificates
  4. #
  5. logfile="/var/log/syslog";
  6. if [ $(dehydrated -c -4|grep 'Certificate will not expire'|wc -l) != 0 ];
  7. then
  8. echo "$(date +%c) certbot(dehydrated): no certificates to upgrade...">>$logfile;
  9. exit;
  10. else
  11. /etc/scripts/sertbot/dehydrated/make_ssl-dehydrated.sh;
  12. /etc/init.d/haproxy restart;
  13. echo "$(date +%c) certbot(dehydrated): updating sertificate">>$logfile;
  14. fi