diff --git a/certbot.wrapper b/certbot.wrapper index f7db16447..83576e47c 100755 --- a/certbot.wrapper +++ b/certbot.wrapper @@ -35,4 +35,4 @@ export CERTBOT_AUGEAS_PATH="${SNAP}/usr/lib/${ARCH_TRIPLET}/libaugeas.so.0" CERTBOT_PLUGIN_PATH="$(curl -s --unix-socket /run/snapd.socket "http://localhost/v2/connections?snap=certbot&interface=content" | jq -r '.result.established | map(select(.plug.plug == "plugin" and ."plug-attrs".content == "certbot-1") | "/snap/"+.slot.snap+"/current/lib/python3.8/site-packages/" ) | join(":")')" export CERTBOT_PLUGIN_PATH -exec certbot "$@" +exec certbot "$@" --preconfigured-renewal diff --git a/certbot/CHANGELOG.md b/certbot/CHANGELOG.md index bfeaf327a..a0c8c5818 100644 --- a/certbot/CHANGELOG.md +++ b/certbot/CHANGELOG.md @@ -6,7 +6,8 @@ Certbot adheres to [Semantic Versioning](https://semver.org/). ### Added -* +* `--preconfigured-renewal` flag, for packager use only. + See the [packaging guide](https://certbot.eff.org/docs/packaging.html). ### Changed diff --git a/certbot/certbot/_internal/cli/__init__.py b/certbot/certbot/_internal/cli/__init__.py index 45165054d..e4909840e 100644 --- a/certbot/certbot/_internal/cli/__init__.py +++ b/certbot/certbot/_internal/cli/__init__.py @@ -100,6 +100,11 @@ def prepare_and_parse_args(plugins, args, detect_defaults=False): "be kept by Certbot's built in log rotation. Setting this " "flag to 0 disables log rotation entirely, causing " "Certbot to always append to the same log file.") + helpful.add( + None, "--preconfigured-renewal", dest="preconfigured_renewal", + action="store_true", default=flag_default("preconfigured_renewal"), + help=argparse.SUPPRESS + ) helpful.add( [None, "automation", "run", "certonly", "enhance"], "-n", "--non-interactive", "--noninteractive", diff --git a/certbot/certbot/_internal/constants.py b/certbot/certbot/_internal/constants.py index 68134ef42..3131bad06 100644 --- a/certbot/certbot/_internal/constants.py +++ b/certbot/certbot/_internal/constants.py @@ -25,6 +25,7 @@ CLI_DEFAULTS = dict( verbose_count=-int(logging.INFO / 10), text_mode=False, max_log_backups=1000, + preconfigured_renewal=False, noninteractive_mode=False, force_interactive=False, domains=[], diff --git a/certbot/docs/packaging.rst b/certbot/docs/packaging.rst index a8fbeaa59..4bc63ac0d 100644 --- a/certbot/docs/packaging.rst +++ b/certbot/docs/packaging.rst @@ -46,7 +46,11 @@ Notes for package maintainers 2. To run tests on our packages, you should use pytest by running the command ``python -m pytest``. Running ``pytest`` directly may not work because PYTHONPATH is not handled the same way and local modules may not be found by the test runner. -3. If you'd like to include automated renewal in your package ``certbot renew -q`` should be added to crontab or systemd timer. Additionally you should include a random per-machine time offset to avoid having a large number of your clients hit Let's Encrypt's servers simultaneously. +3. If you'd like to include automated renewal in your package: + + - ``certbot renew -q`` should be added to crontab or systemd timer. + - A random per-machine time offset should be included to avoid having a large number of your clients hit Let's Encrypt's servers simultaneously. + - ``--preconfigured-renewal`` should be included on the CLI or in ``cli.ini`` for all invocations of Certbot, so that it can adjust its interactive output regarding automated renewal (Certbot >= 1.9.0). 4. ``jws`` is an internal script for ``acme`` module and it doesn't have to be packaged - it's mostly for debugging: you can use it as ``echo foo | jws sign | jws verify``.