mirror of
https://github.com/certbot/certbot.git
synced 2026-08-03 12:02:03 +02:00
Add webroot_map to default detection
This commit is contained in:
+2
-1
@@ -100,7 +100,8 @@ ZERO_ARG_ACTIONS = set(("store_const", "store_true",
|
||||
# Maps a config option to a list of config options that may have modified it.
|
||||
# This dictionary is used recursively, so if A modifies B and B modifies C,
|
||||
# it is determined that C was modified by the user if A was modified.
|
||||
VAR_MODIFIERS = {"account": ["server"], "server": ["dry_run", "staging"]}
|
||||
VAR_MODIFIERS = {"account": ["server"], "server": ["dry_run", "staging"],
|
||||
"webroot_map": ["webroot_path"]}
|
||||
|
||||
|
||||
def usage_strings(plugins):
|
||||
|
||||
@@ -96,16 +96,14 @@ def _restore_webroot_config(config, renewalparams):
|
||||
form.
|
||||
"""
|
||||
if "webroot_map" in renewalparams:
|
||||
# if the user does anything that would create a new webroot map on the
|
||||
# CLI, don't use the old one
|
||||
if not (cli.set_by_cli("webroot_map") or cli.set_by_cli("webroot_path")):
|
||||
setattr(config.namespace, "webroot_map", renewalparams["webroot_map"])
|
||||
if not cli.set_by_cli("webroot_map"):
|
||||
config.namespace.webroot_map = renewalparams["webroot_map"]
|
||||
elif "webroot_path" in renewalparams:
|
||||
logger.info("Ancient renewal conf file without webroot-map, restoring webroot-path")
|
||||
wp = renewalparams["webroot_path"]
|
||||
if isinstance(wp, str): # prior to 0.1.0, webroot_path was a string
|
||||
wp = [wp]
|
||||
setattr(config.namespace, "webroot_path", wp)
|
||||
config.namespace.webroot_path = wp
|
||||
|
||||
|
||||
def _restore_plugin_configs(config, renewalparams):
|
||||
|
||||
Reference in New Issue
Block a user