diff --git a/bundles/systemd-timers/files/template.service b/bundles/systemd-timers/files/template.service index 6f7c444..ed68677 100644 --- a/bundles/systemd-timers/files/template.service +++ b/bundles/systemd-timers/files/template.service @@ -17,6 +17,8 @@ Type=oneshot % for command in config['command']: ExecStart=/usr/local/sbin/systemd-timer-monitored ${timer} ${command} % endfor +% elif config.get('exclude_from_monitoring', False): +ExecStart=${config['command']} % else: ExecStart=/usr/local/sbin/systemd-timer-monitored ${timer} ${config['command']} % endif diff --git a/bundles/systemd-timers/metadata.py b/bundles/systemd-timers/metadata.py index 23f87ff..9aaf573 100644 --- a/bundles/systemd-timers/metadata.py +++ b/bundles/systemd-timers/metadata.py @@ -5,7 +5,10 @@ def monitoring(metadata): services = {} for timer, config in node.metadata.get('systemd-timers/timers', {}).items(): - if config.get('delete', False): + if ( + config.get('delete', False) + or config.get('exclude_from_monitoring', False) + ): continue services[f'SYSTEMD-TIMER {timer}'] = {