aboutsummaryrefslogtreecommitdiffstats
path: root/script/make-crontab
blob: 1b4fbabbd2d481bd66725942c50fcea71c277675 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
#!/usr/bin/env python
import re

mailto = "recipient-of-any-errors@localhost"
user = "user-to-run-as"
location = "/path/to/alaveteli"

template = open("config/crontab.ugly").read()
template = re.sub(r"MAILTO=.*", "MAILTO=%s" % mailto, template)
template = template.replace("!!(*= $user *)!!", user)
template = re.sub(r"/data/vhost/.*/script", location + "/script", template)

print template