aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--doc/INSTALL.md16
-rwxr-xr-xscript/make-crontab16
2 files changed, 14 insertions, 18 deletions
diff --git a/doc/INSTALL.md b/doc/INSTALL.md
index e466edd55..ef70f8139 100644
--- a/doc/INSTALL.md
+++ b/doc/INSTALL.md
@@ -336,8 +336,20 @@ 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.
+There is a rake task that will help to rewrite this file into
+one that is useful to you, which can be invoked with:
+
+ bundle exec rake config_files:convert_crontab \
+ DEPLOY_USER=deploy \
+ VHOST_DIR=/dir/above/alaveteli \
+ VCSPATH=alaveteli \
+ SITE=alaveteli \
+ CRONTAB=config/crontab-example > crontab
+
+You should change the `DEPLOY_USER`, `VHOST_DIR`, `VCSPATH` and
+`SITE` environment variables to match your server and
+installation. You should also edit the resulting `crontab` file
+to customize the `MAILTO` variable.
One of the cron jobs refers to a script at
`/etc/init.d/foi-alert-tracks`. This is an init script, a copy of
diff --git a/script/make-crontab b/script/make-crontab
deleted file mode 100755
index d214f1485..000000000
--- a/script/make-crontab
+++ /dev/null
@@ -1,16 +0,0 @@
-#!/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
-
-
-