diff options
-rw-r--r-- | doc/INSTALL.md | 3 | ||||
-rwxr-xr-x | script/make-crontab | 16 |
2 files changed, 19 insertions, 0 deletions
diff --git a/doc/INSTALL.md b/doc/INSTALL.md index 383203a6a..4aedf0ccb 100644 --- a/doc/INSTALL.md +++ b/doc/INSTALL.md @@ -318,6 +318,9 @@ like `!!(*= $this *)!!`. The variables are: * `user`: the user that the software runs as * `site`: a string to identify your alaveteli instance +There is a dumb python script at `script/make-crontab` which you can +edit and run to do some basic substitution for you. + One of the cron jobs refers to a script at `/etc/init.d/foi-alert-tracks`. This is an init script, a copy of which lives in `config/alert-tracks-debian.ugly`. As with the cron 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 + + + |