aboutsummaryrefslogtreecommitdiffstats
path: root/config
diff options
context:
space:
mode:
Diffstat (limited to 'config')
-rw-r--r--config/alert-tracks-debian.ugly14
-rw-r--r--config/crontab.ugly3
-rw-r--r--config/environment.rb8
-rw-r--r--config/general.yml-example13
-rw-r--r--config/packages1
5 files changed, 32 insertions, 7 deletions
diff --git a/config/alert-tracks-debian.ugly b/config/alert-tracks-debian.ugly
index e4cc12b38..730a125b4 100644
--- a/config/alert-tracks-debian.ugly
+++ b/config/alert-tracks-debian.ugly
@@ -6,11 +6,11 @@
# Required-Stop: $local_fs $syslog
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
-# Short-Description: alert-tracks is a daemon running the WhatDoTheyKnow email alerts
-# Description: alert-tracks send WhatDoTheyKnow email alerts as required
+# Short-Description: alert-tracks is a daemon running the Alaveteli email alerts
+# Description: alert-tracks send Alaveteli email alerts as required
### END INIT INFO
#
-# !!(*= $daemon_name *)!! Start the WhatDoTheyKnow email alert daemon
+# !!(*= $daemon_name *)!! Start the Alaveteli email alert daemon
NAME=!!(*= $daemon_name *)!!
DAEMON=/data/vhost/!!(*= $vhost *)!!/alaveteli/script/runner
@@ -42,7 +42,7 @@ case "$1" in
quietly_start_daemon
if [ $? -ne 1 ]
then
- echo "WhatDoTheyKnow alert daemon was not running; now restarted"
+ echo "Alaveteli alert daemon was not running; now restarted"
exit 1
else
exit 0
@@ -50,17 +50,17 @@ case "$1" in
;;
start)
- echo -n "Starting WhatDoTheyKnow alert daemon: $NAME"
+ echo -n "Starting Alaveteli alert daemon: $NAME"
start_daemon
;;
stop)
- echo -n "Stopping WhatDoTheyKnow alert daemon: $NAME"
+ echo -n "Stopping Alaveteli alert daemon: $NAME"
stop_daemon
;;
restart)
- echo -n "Restarting WhatDoTheyKnow alert daemon: $NAME"
+ echo -n "Restarting Alaveteli alert daemon: $NAME"
stop_daemon
start_daemon
;;
diff --git a/config/crontab.ugly b/config/crontab.ugly
index 5820151a0..ecd3151ff 100644
--- a/config/crontab.ugly
+++ b/config/crontab.ugly
@@ -27,6 +27,9 @@ MAILTO=cron-!!(*= $site *)!!@mysociety.org
0 8 * * * !!(*= $user *)!! run-with-lockfile -n /data/vhost/!!(*= $vhost *)!!/alert-not-clarified-request.lock /data/vhost/!!(*= $vhost *)!!/!!(*= $vcspath *)!!/script/alert-not-clarified-request || echo "stalled?"
2 4 * * * !!(*= $user *)!! run-with-lockfile -n /data/vhost/!!(*= $vhost *)!!/check-recent-requests-sent.lock /data/vhost/!!(*= $vhost *)!!/!!(*= $vcspath *)!!/script/check-recent-requests-sent || echo "stalled?"
45 3 * * * !!(*= $user *)!! run-with-lockfile -n /data/vhost/!!(*= $vhost *)!!/stop-new-responses-on-old-requests.lock /data/vhost/!!(*= $vhost *)!!/!!(*= $vcspath *)!!/script/stop-new-responses-on-old-requests || echo "stalled?"
+# Only root can restart apache
+31 1 * * * root run-with-lockfile -n /data/vhost/!!(*= $vhost *)!!/compact-xapian-database.lock /data/vhost/!!(*= $vhost *)!!/!!(*= $vcspath *)!!/script/compact-xapian-database production || echo "stalled?"
+
# Once a day on all servers
43 2 * * * !!(*= $user *)!! /data/vhost/!!(*= $vhost *)!!/!!(*= $vcspath *)!!/script/request-creation-graph
diff --git a/config/environment.rb b/config/environment.rb
index a40c2df4e..73cab9201 100644
--- a/config/environment.rb
+++ b/config/environment.rb
@@ -28,6 +28,12 @@ load "config.rb"
load "format.rb"
load "debug_helpers.rb"
load "util.rb"
+# Patch Rails::GemDependency to cope with older versions of rubygems, e.g. in Debian Lenny
+# Restores override removed in https://github.com/rails/rails/commit/c20a4d18e36a13b5eea3155beba36bb582c0cc87
+# without effecting method behaviour
+# and adds fallback gem call removed in https://github.com/rails/rails/commit/4c3725723f15fab0a424cb1318b82b460714b72f
+require File.join(File.dirname(__FILE__), '../lib/old_rubygems_patch')
+
Rails::Initializer.run do |config|
# Load intial mySociety config
@@ -122,6 +128,7 @@ else
end
FastGettext.default_available_locales = available_locales
+I18n.locale = default_locale
I18n.available_locales = available_locales
I18n.default_locale = default_locale
@@ -136,3 +143,4 @@ require 'willpaginate_hack.rb'
require 'sendmail_return_path.rb'
require 'tnef.rb'
require 'i18n_fixes.rb'
+require 'rack_quote_monkeypatch.rb'
diff --git a/config/general.yml-example b/config/general.yml-example
index 9db95c4d0..3537cd792 100644
--- a/config/general.yml-example
+++ b/config/general.yml-example
@@ -19,9 +19,13 @@ TWITTER_USERNAME: 'whatdotheyknow'
# Locales we wish to support in this app, space-delimited
AVAILABLE_LOCALES: 'en es'
DEFAULT_LOCALE: 'en'
+USE_DEFAULT_BROWSER_LANGUAGE: true
# How many days should have passed before an answer to a request is officially late?
REPLY_LATE_AFTER_DAYS: 20
+REPLY_VERY_LATE_AFTER_DAYS: 40
+# We give some types of authority like schools a bit longer than everyone else
+SPECIAL_REPLY_VERY_LATE_AFTER_DAYS: 60
# example searches for the home page, semicolon delimited.
FRONTPAGE_SEARCH_EXAMPLES: 'Geraldine Quango; Department for Humpadinking'
@@ -93,3 +97,12 @@ RECAPTCHA_PRIVATE_KEY: 'x'
# existing process previously served a larger request, this won't
# show any consumption for the later request.
DEBUG_RECORD_MEMORY: false
+
+# Currently we default to using pdftk to compress PDFs. You can
+# optionally try Ghostscript, which should do a better job of
+# compression. Some versions of pdftk are buggy with respect to
+# compression, in which case Alaveteli doesn't recompress the PDFs at
+# all and logs a warning message "Unable to compress PDF"; which would
+# be another reason to try this setting.
+USE_GHOSTSCRIPT_COMPRESSION: true
+
diff --git a/config/packages b/config/packages
index 4695ea828..a42785824 100644
--- a/config/packages
+++ b/config/packages
@@ -17,6 +17,7 @@ elinks
unrtf
xlhtml
libxapian-ruby1.8
+xapian-tools
gnuplot-nox
php5-cli
# ttf-bitstream-vera