From 46efc1038c2d6317f85a72aca557a4e63e37cd34 Mon Sep 17 00:00:00 2001 From: Kishi85 Date: Sun, 24 Mar 2019 17:12:36 +0100 Subject: [PATCH] acertmgr: always check certificate destinations for update + actions --- acertmgr/__init__.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/acertmgr/__init__.py b/acertmgr/__init__.py index 9abdd3a..2778219 100755 --- a/acertmgr/__init__.py +++ b/acertmgr/__init__.py @@ -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())