From ff6968ace6ba254dbeb76beea89f4a4b386689d2 Mon Sep 17 00:00:00 2001 From: Daniel Schaal Date: Fri, 18 Jul 2014 19:20:17 +0200 Subject: [PATCH] Add shell to job dict --- systemd-crontab-generator | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/systemd-crontab-generator b/systemd-crontab-generator index 0a6e52d..27f5bd9 100755 --- a/systemd-crontab-generator +++ b/systemd-crontab-generator @@ -70,6 +70,7 @@ def parse_crontab(filename, withuser=True, monotonic=False): environment['HOME'] = ROOT_USER.pw_dir yield { 'e': ' '.join('"%s=%s"' % kv for kv in environment.iteritems()), + 's': environment['SHELL'], 'l': line, 'f': filename, 'p': period, @@ -98,6 +99,7 @@ def parse_crontab(filename, withuser=True, monotonic=False): yield { 'e': ' '.join('"%s=%s"' % kv for kv in environment.iteritems()), + 's': environment['SHELL'], 'l': line, 'f': filename, 'p': period, @@ -117,6 +119,7 @@ def parse_crontab(filename, withuser=True, monotonic=False): yield { 'e': ' '.join('"%s=%s"' % kv for kv in environment.iteritems()), + 's': environment['SHELL'], 'l': line, 'f': filename, 'm': parse_time_unit(minutes, MINUTES_SET), @@ -226,7 +229,7 @@ Type=oneshot User=%s Environment=%s ExecStart=%s -c '%s' -''' % (SELF, job['f'], job['l'], job['u'], job['e'], job['e'].get('SHELL', '/bin/sh'), job['c'])) +''' % (SELF, job['f'], job['l'], job['u'], job['e'], job['s'], job['c'])) return '%s.timer' % unit_name