Cron for SSL/TLS certificate renewal via acme.sh
This shell scipt is intended for usage in /etc/cron.monthly
or /etc/cron.weekly
scenarios.
- acme.sh should be installed
- web server should be already configured for serving https
MONITORING_URL
— should be pointing to your cron monitoring webhook (e.g. Cronitor).COMMON_NAME
— hostname which the certificate should be issued for.EC_CURVE
— private key elliptic curve.
- If you prefer a CA other than LE, go ahead and adjust the
sign_csr
function, the--server
parameter. - In case you plan to use RSA keys, go ahead and adjust the
generate_new_key
function. - If you use other server than nginx, go ahead and update the restart hooks.
- If you are not going to use cron monitoring via webhooks, go ahead and remove the calls from the code.