From 39aa7db24c64916b61419747796f078c1a089bfd Mon Sep 17 00:00:00 2001 From: Kishi85 Date: Thu, 28 Mar 2019 00:20:55 +0100 Subject: [PATCH] acertmgr: deploy certificates after all are renewed as certificate renewal might take some time (on DNS-01 especially) it is a good idea to wait with deployment until all certificates are finished renewing and copy them to their destinations then + run actions --- acertmgr/__init__.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/acertmgr/__init__.py b/acertmgr/__init__.py index 01b7b1c..5daefa7 100755 --- a/acertmgr/__init__.py +++ b/acertmgr/__init__.py @@ -173,6 +173,8 @@ def main(): re.escape(runtimeconfig['force_renew'])), config['domains'])): cert_get(config) + # deploy new certificates after all are renewed + for config in domainconfigs: for cfg in config['actions']: if not tools.target_is_current(cfg['path'], config['cert_file']): print("Updating '{}' due to newer version".format(cfg['path'])) @@ -186,4 +188,4 @@ def main(): output = subprocess.check_output(action, shell=True, stderr=subprocess.STDOUT) print("Executed '{}' successfully: {}".format(action, output)) except subprocess.CalledProcessError as e: - print("Execution of '{}' failed with error '{}': {}".format(e.cmd, e.returncode, e.output)) + print("Execution of '{}' failed with error '{}': {}".format(e.cmd, e.returncode, e.output)) \ No newline at end of file