mirror of
https://github.com/moepman/acertmgr.git
synced 2024-11-14 17:25:26 +01:00
acertmgr: always check certificate destinations for update + actions
This commit is contained in:
parent
fd2134753a
commit
46efc1038c
@ -168,11 +168,13 @@ def main():
|
||||
ttl_days = int(config['ttl_days'])
|
||||
if not tools.is_cert_valid(cert_file, ttl_days):
|
||||
cert_get(config)
|
||||
for cfg in config['actions']:
|
||||
if not target_is_current(cfg['path'], cert_file):
|
||||
actions.add(cert_put(cfg))
|
||||
for cfg in config['actions']:
|
||||
if not tools.target_is_current(cfg['path'], cert_file):
|
||||
print("Updating '{}' due to newer certificate".format(cfg['path']))
|
||||
actions.add(cert_put(cfg))
|
||||
|
||||
# run post-update actions
|
||||
for action in actions:
|
||||
if action is not None:
|
||||
print("Running '{}' to trigger update for changes".format(action))
|
||||
subprocess.call(action.split())
|
||||
|
Loading…
Reference in New Issue
Block a user