1
0
mirror of https://github.com/certbot/certbot.git synced 2026-01-26 07:41:33 +03:00

cli: add --preconfigured-renewal packaging flag (#8274)

* cli: add --preconfigured-renewal packaging flag

* fix rst formatting

* snap: make the flag postfixed
This commit is contained in:
alexzorin
2020-09-16 08:45:36 +10:00
committed by GitHub
parent 2b425110dc
commit f43fa12fc0
5 changed files with 14 additions and 3 deletions

View File

@@ -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

View File

@@ -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

View File

@@ -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",

View File

@@ -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=[],

View File

@@ -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``.