aboutsummaryrefslogtreecommitdiffstats
path: root/script/make-crontab
blob: d214f1485cb3fa93a10eeafad4e66bd6b2a23434 (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-example").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