HTTPS SSH

UpdateCertificate Script - README


Overview

The UpdateCertificate script (Bash) can be used to renew a SSL certificate from Let's Encrypt all 2 months. Those certificates are only valid for 90 days and therefore a cronjob can be used to make an automatic renewal. After the renewal process, an email is sent to the administrator with the status of the operation.

Setup

  • Install the software packages sendemail, libnet-ssleay-perl and libio-socket-ssl-perl.
  • You can use the command: apt-get install sendemail libnet-ssleay-perl libio-socket-ssl-perl
  • Copy the update script update_certificate.sh to your computer.
  • Make the update script executable: chmod +x update_certificate.sh.
  • Edit the configuration part of the update_certificate.sh script.
  • Start the update script from the command prompt: ./update_certificate.sh
  • Check if the certificate renewal works in the testmode (dry-run) and if you receive an email.
  • If everything works OK, remove the parameter '--dry-run' from the script.
  • Add a cronjob to execute the script periodically (all 2 months).
  • Example cronjob: 0 0 1 JAN,MAR,MAY,JUL,SEP,NOV * /path/to/script/update_certificate.sh

Support

This is a free tool and support is not included and guaranteed. Nevertheless I will try to answer all your questions if possible. So write to my email address biegel[at]gmx.ch if you have a question :-)

License

The UpdateCertificate script is licensed under the MIT License (Expat) which is published on the official site of the Open Source Initiative.