diff options
author | Seb Bacon <seb.bacon@gmail.com> | 2012-07-16 11:56:55 +0100 |
---|---|---|
committer | Seb Bacon <seb.bacon@gmail.com> | 2012-07-16 11:56:55 +0100 |
commit | 7aeb616b07d5bd16af62b8139d2a0908f065f0e2 (patch) | |
tree | eb60c64f89227d048fc93d5955ba3779236bf251 /script/make-crontab | |
parent | 6e89a7e1723904d520beba56bceb565e5129f65b (diff) |
A dumb script to generate a crontab
Diffstat (limited to 'script/make-crontab')
-rwxr-xr-x | script/make-crontab | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/script/make-crontab b/script/make-crontab new file mode 100755 index 000000000..1b4fbabbd --- /dev/null +++ b/script/make-crontab @@ -0,0 +1,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 + + + |