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
This commit is contained in:
Kishi85 2019-03-28 00:20:55 +01:00
parent 737578159b
commit 39aa7db24c
1 changed files with 3 additions and 1 deletions

View File

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