This commit is contained in:
Konstantin Stepanov 2014-04-21 07:21:38 -07:00
parent cd2df6a28a
commit ec7bf7111a

View File

@ -114,7 +114,9 @@ def generate_timer_unit(line, job, seq):
','.join(map(str, job['d'])), ','.join(map(str, job['h'])), ','.join(map(str, job['m'])))
with open('%s/%s.timer' % (TARGER_DIR, unit_name), 'w') as f:
f.write('''[Unit]
f.write('''# Automatically generated by systemd-crontab-generator
[Unit]
Description=[Cron] "%s"
PartOf=cron.target
RefuseManualStart=true
@ -126,7 +128,9 @@ Unit=%s.service
''' % (line, unit_name, schedule))
with open('%s/%s.service' % (TARGER_DIR, unit_name), 'w') as f:
f.write('''[Unit]\n')
f.write('''# Automatically generated by systemd-crontab-generator
[Unit]
Description=[Cron] "%s"
RefuseManualStart=true
RefuseManualStop=true