From 40485ced8a499a87d544e739b9bc032df222fb86 Mon Sep 17 00:00:00 2001 From: Franziska Kunsmann Date: Mon, 7 Feb 2022 07:01:19 +0100 Subject: [PATCH] bundles/systemd-timers: add support for multiple commands in timer --- bundles/systemd-timers/files/template.service | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/bundles/systemd-timers/files/template.service b/bundles/systemd-timers/files/template.service index 7465f8f..6f7c444 100644 --- a/bundles/systemd-timers/files/template.service +++ b/bundles/systemd-timers/files/template.service @@ -12,4 +12,11 @@ Group=${config.get('group', config.get('user', 'root'))} Environment=${k}=${v} % endfor WorkingDirectory=${config.get('pwd', '/')} +Type=oneshot +% if isinstance(config['command'], list): +% for command in config['command']: +ExecStart=/usr/local/sbin/systemd-timer-monitored ${timer} ${command} +% endfor +% else: ExecStart=/usr/local/sbin/systemd-timer-monitored ${timer} ${config['command']} +% endif