diff options
author | alexzorin <alex@zorin.id.au> | 2021-05-26 16:45:40 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-05-26 16:45:40 +0300 |
commit | 7ce86f588b5d0f072a8766dbae0f7ad613b2021f (patch) | |
tree | 50eeb9e858b966a57096b334c6e6af7f9a946c91 /windows-installer | |
parent | 39b396763aeaee10dcdbda656fa040e2a2f03956 (diff) |
windows: always run with --preconfigured-renewal (#8867)
Adds a Pynsist extra_preamble in the Certbot entry_point for the
Windows installer, ensuring the flag is always set.
Diffstat (limited to 'windows-installer')
-rw-r--r-- | windows-installer/assets/preamble.py | 12 | ||||
-rw-r--r-- | windows-installer/windows_installer/construct.py | 2 |
2 files changed, 14 insertions, 0 deletions
diff --git a/windows-installer/assets/preamble.py b/windows-installer/assets/preamble.py new file mode 100644 index 000000000..fea8e9fd8 --- /dev/null +++ b/windows-installer/assets/preamble.py @@ -0,0 +1,12 @@ +"""Pynsist extra_preamble for the Certbot entry point. + +This preamble ensures that Certbot on Windows always runs with the --preconfigured-renewal +flag set. Since Pynsist creates a Scheduled Task for renewal, we want this flag to be set +so that we can provide the right automated renewal advice to Certbot on Windows users. + +""" + + +import sys + +sys.argv += ["--preconfigured-renewal"] diff --git a/windows-installer/windows_installer/construct.py b/windows-installer/windows_installer/construct.py index 91df6b714..3c2525dc8 100644 --- a/windows-installer/windows_installer/construct.py +++ b/windows-installer/windows_installer/construct.py @@ -82,6 +82,7 @@ def _copy_assets(build_path, repo_path): shutil.copy(os.path.join(repo_path, 'windows-installer', 'assets', 'template.nsi'), build_path) shutil.copy(os.path.join(repo_path, 'windows-installer', 'assets', 'renew-up.ps1'), build_path) shutil.copy(os.path.join(repo_path, 'windows-installer', 'assets', 'renew-down.ps1'), build_path) + shutil.copy(os.path.join(repo_path, 'windows-installer', 'assets', 'preamble.py'), build_path) def _generate_pynsist_config(repo_path, build_path): @@ -121,6 +122,7 @@ files=run.bat [Command certbot] entry_point=certbot.main:main +extra_preamble=preamble.py '''.format(certbot_version=certbot_version, installer_suffix='win_amd64' if PYTHON_BITNESS == 64 else 'win32', python_bitness=PYTHON_BITNESS, |