diff options
| -rw-r--r-- | config/crontab-example (renamed from config/crontab.ugly) | 6 | ||||
| -rw-r--r-- | doc/INSTALL.md | 4 | ||||
| -rwxr-xr-x | script/make-crontab | 2 | 
3 files changed, 6 insertions, 6 deletions
diff --git a/config/crontab.ugly b/config/crontab-example index d33450df4..32baff170 100644 --- a/config/crontab.ugly +++ b/config/crontab-example @@ -1,7 +1,7 @@ -# crontab.ugly: -# Timed tasks for FOI site. Template file. +# crontab-example: +# Timed tasks for Alaveteli site. Template file.  # -# Copyright (c) 2008 UK Citizens Online Democracy. All rights reserved. +# Copyright (c) 2013 UK Citizens Online Democracy. All rights reserved.  # Email: hello@mysociety.org. WWW: http://www.mysociety.org/  PATH=/usr/local/bin:/usr/bin:/bin diff --git a/doc/INSTALL.md b/doc/INSTALL.md index b6e8d2265..b356208a4 100644 --- a/doc/INSTALL.md +++ b/doc/INSTALL.md @@ -307,9 +307,9 @@ by setting `SKIP_ADMIN_AUTH` to `true` in `general.yml`.  # Cron jobs and init scripts -`config/crontab.ugly` contains the cronjobs run on WhatDoTheyKnow. +`config/crontab-example` contains the cronjobs run on WhatDoTheyKnow.  It's in a strange templating format they use in mySociety.  mySociety -render the "ugly" file to reference absolute paths, and then drop it +render the example file to reference absolute paths, and then drop it  in `/etc/cron.d/` on the server.  The `ugly` format uses simple variable substitution.  A variable looks diff --git a/script/make-crontab b/script/make-crontab index 1b4fbabbd..d214f1485 100755 --- a/script/make-crontab +++ b/script/make-crontab @@ -5,7 +5,7 @@ mailto = "recipient-of-any-errors@localhost"  user = "user-to-run-as"  location = "/path/to/alaveteli" -template = open("config/crontab.ugly").read() +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)  | 
