mirror of
https://github.com/certbot/certbot.git
synced 2026-05-28 04:34:11 -04:00
https://github.com/certbot/certbot/pull/10146 was supposed to do this, but because of multiple code paths, it did not. This PR simplifies the code by creating a single code path. In particular: - `hooks.renew_hook()` is removed. There are now only calls to `hooks.deploy_hook()`, which is called during certonly, run, and renew, and runs both cli and directory hooks. - `cli_config.renew_hook` is removed. Both `--renew-hook` (hidden option kept for backwards compatibility purposes and `--deploy-hook` now set `cli_config.deploy_hook`, which is used internally. When either or both flags are used multiple times, the last value is kept, which is the argparse default. - references to running a "renew hook" internally are changed to "deploy hook" - To maintain downgrade compatibility, `deploy_hook` is written out to renewal config files as `renew_hook`. This is achieved by translating to and from `renew_hook` in `storage.py` and changing `renewal.STR_CONFIG_ITEMS` to contain `deploy_hook`. This results in the following behavior changes: - Directory hooks are now run when getting a new cert using certonly/run - If someone set a renew hook on the cli using `--renew-hook`, it would previously not be run when getting a new (non-renewed) cert, but now will be. But this option is hidden and should no longer be used anyway. - When using `certbot reconfigure`, if someone sets `--renew-hook` certbot will now also ask if someone would like to do a test run of the new hook, whereas before it would only do so for `--deploy-hook`. --------- Co-authored-by: Brad Warren <bmw@users.noreply.github.com> |
||
|---|---|---|
| .. | ||
| src | ||
| MANIFEST.in | ||
| pyproject.toml | ||
| setup.py | ||