One skilled person could manage using --config-dir perhaps. But, as a tool suggested for a broader audience it seems fragile.
The tool @karolyi maintains is designed to replace using Certbot - instead of invoking certbot renew
, users invoke the daneupdate
command which handles the DANE pre/post work and wraps the Certbot functionality. The confusion @9peppe had above is from the line in the readme stating "It entirely replaces the certbot renew
command" - the daneupdate
does not alter certbot to replace the renew
subcommand, but is a drop-in replacement for invoking Certbot, as in cerbot renew
, entirely.
i.e the commandline would change as:
- (certbot-3.12.2) $ certbot renew
+ (daneupdate-3.12.2) $ daneupdate
Instead of interacting with Certbot's internals and private defs as the current system does, another approach would be for the daneupdate
command to invoke Certbot with the necessary flags (such as) --config-dir
. Under this approach, end users would never invoke Certbot – all the usage that requires --config-dir
would happen programmatically through the daneupdate
command.
Using --deploy-hook
would not work for this setup for a few reasons, but primarily because there would still be a race condition between (1) when Certbot writes the files to disk and (2) when the --deploy-hook
moves them. It is possible that a mixture of using a custom --cert-name
in conjunction with --deploy-hook
could avoid these problems, but I think that starts to overcomplicate things far more than an isolated --config-dir
environment would - and all of this still needs to be wrapped into the pipeline of functionality the tool provides via a certbot plugin or invoking Cerbot through a subprocess, so there really isn't a concern for end-users getting confused.
@karolyi wants to avoid subprocesses, so this is likely not a solution for them, but I do think it is the least fragile and most manageable approach.
I don't see any inconsistency there, and that is pretty obvious. Some people are just rushed or stupid, and useful tools should not be abandoned or discouraged because of that.
Edit: The --deploy-hook
idea I have is this- use a custom --cert-name=dane-{NAME}
, then use a deploy hook to migrate that cert into whatever directory that needs to be. That would allow the cert to eventually be installed as if it were --cert-name={NAME}
but without getting caught by process that is monitoring that directory for changes between originally writing the file to disk and whatever actions need to be taken beforehand in the deploy hook. I think should address the concerns , but I very well could be wrong as I'm not very familiar with the DANE integration and only skimmed the codebase.