auto-ssl / lua-resty-auto-ssl

On the fly (and free) SSL registration and renewal inside OpenResty/nginx with Let's Encrypt.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Cannot change the renewal interval

haagtobias opened this issue · comments

In our company we have a requirement to renew certificates 40 days before they expire. Currently this cannot be configured in resty-auto-ssl. There should be an option to configure this.
As a workaround I had to do two things

  • Change the following line in renewal.lua by replacing the 30 with 40 if now + (30 * 24 * 60 * 60) < cert["expiry"] then
  • Set RENEW_DAYS="40", because otherwise dehydrated will do nothing

It would be great if we had an option to configure the number of days. The same value could/should be used for the lua code and the dehydrated parameter.