Skip to content
This repository was archived by the owner on Jan 7, 2026. It is now read-only.

Conversation

@imro2
Copy link

@imro2 imro2 commented Apr 15, 2021

Fix for #6 where certbot renew is not able to use cli.ini because it contains shortened parameter name domain instead of domains.

Changed verbosity from -n to -q to stop cron from generating emails every hour.

@arugifa
Copy link
Owner

arugifa commented Apr 20, 2021

Hi @imro2

Thanks again for your PR! I didn't reply immediately, because I was a bit concerned about deactivating (almost) completely Certbot output. I find it very useful during debugging, as Certbot stdout is well handled by Docker, and can be seen with docker logs.

So I had a look at the Cronjob executor this image is using. And it is possible somehow to deactivate Cron emails with a small hack, by running crond with crond -M false there:

CMD ./generate_config.py --certbot && certbot -n certonly; crond && ./generate_config.py --postfix && postfix start-fg

This will not deactivate emails completely, as we can see in dcron manpage: https://github.com/dubiousjim/dcron/blob/1ba33c3325df48de46263276a43ed76cf9d81518/crond.8#L46

It will instead try to run the false command to send an email: https://github.com/dubiousjim/dcron/blob/1ba33c3325df48de46263276a43ed76cf9d81518/job.c#L343

Which should do the trick at the end, as false is dong nothing (in fact, it is returning an exit status code set to 1, and I'm not sure about the behavior of dcron in that case...).

So I would prefer we go for this approach at the end, unless you see something wrong doing so maybe? 💡

@imro2
Copy link
Author

imro2 commented Apr 22, 2021

No worries, I am in no rush, just trying to contribute.

I understand what you mean about having output for logging, but I don't think that you can see cron output in stdout the way you have it set up. At least I did not see any out put. As far as I know you would have to use supervisord, s6 or some other process supervisor to accomplish that.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants