separate letsencrypt cron from collectinfo.pl cron

Hello,

We need to separate the webmin cron job for collecting info from let's encrypt renew so we can separate schedule for both. Any suggestions how can that be done ?

As I see:

collectinfo is here /usr/libexec/webmin/virtual-server/collectinfo.pl

and at the end there is the line:

&apply_letsencrypt_cert_renewals();

webmin cron jobs are here /etc/webmin/webmincron/crons/

But is it sufficient to create new file like the one for collectinfo.pl in /etc/webmin/webmincron/crons/ and a .pl file in /usr/libexec/webmin/virtual-server/ with the line:

&apply_letsencrypt_cert_renewals();

or there is something more I need to do? Or if there is easier method please let me know.

Status: 
Active

Comments

You don't need a separate cron for this though - even though apply_letsencrypt_cert_renewals is called each time collectinfo.pl is run, it only renews the certs that are due.

Yes it does but if for some reason the cert fail it try again and again and again every 15 minutes And send alot of emails to the customers. It will be better to renew all certs ones a day - if fail it will try the next. Bigger issue that we do not know when some cert fail and lets encrypt block the domains combination so we need to add additional domain to change the combination and workaround the limit.

Ok, that seems like a deeper issue that we need to fix properly rather than hacking the cron job.

Which Virtualmin version are you running there?

Now we are on 5.07.gpl becasue we have add/modify files to add functionality and fix some issues we have in virtualmin different than let's encrypt. IS there a fix in the recent versions for Let's encrypt?

Maybe ... what was your specific problem?

As I said most of the problems are users rewrites related, bu sometimes they failed couple of times then without anything changed only manual renew worked.

Rewrites we really can't do much about. Other issues related to excessive retries can only be fixed by a full Virtualmin upgrade.