aboutsummaryrefslogtreecommitdiffstats
path: root/config
diff options
context:
space:
mode:
Diffstat (limited to 'config')
-rw-r--r--config/application.rb1
-rw-r--r--config/deploy.rb5
-rw-r--r--config/deploy.yml.example2
-rw-r--r--config/general.yml-example2
-rw-r--r--config/initializers/alaveteli.rb2
-rw-r--r--config/initializers/missing_source_file.rb2
-rwxr-xr-xconfig/sysvinit-thin.ugly8
7 files changed, 15 insertions, 7 deletions
diff --git a/config/application.rb b/config/application.rb
index 366077795..3c01e26c4 100644
--- a/config/application.rb
+++ b/config/application.rb
@@ -115,6 +115,7 @@ module Alaveteli
'admin.css',
'ie6.css',
'ie7.css',
+ 'bootstrap-dropdown.js',
'responsive/print.css',
'responsive/application-lte-ie7.css',
'responsive/application-ie8.css']
diff --git a/config/deploy.rb b/config/deploy.rb
index c1954d058..f4a0b536a 100644
--- a/config/deploy.rb
+++ b/config/deploy.rb
@@ -14,6 +14,7 @@ set :deploy_to, configuration['deploy_to']
set :user, configuration['user']
set :use_sudo, false
set :rails_env, configuration['rails_env']
+set :daemon_name, configuration.fetch('daemon_name', 'alaveteli')
server configuration['server'], :app, :web, :db, :primary => true
@@ -35,9 +36,9 @@ end
namespace :deploy do
[:start, :stop, :restart].each do |t|
- desc "#{t.to_s.capitalize} Alaveteli service defined in /etc/init.d/alaveteli"
+ desc "#{t.to_s.capitalize} Alaveteli service defined in /etc/init.d/"
task t, :roles => :app, :except => { :no_release => true } do
- run "/etc/init.d/alaveteli #{t}"
+ run "service #{ daemon_name } #{ t }"
end
end
diff --git a/config/deploy.yml.example b/config/deploy.yml.example
index a20eb3c22..93aba439a 100644
--- a/config/deploy.yml.example
+++ b/config/deploy.yml.example
@@ -6,6 +6,7 @@ production:
user: deploy
rails_env: production
deploy_to: /srv/www/alaveteli_production
+ daemon_name: alaveteli
staging:
repository: git://github.com/mysociety/alaveteli.git
branch: develop
@@ -13,3 +14,4 @@ staging:
user: deploy
rails_env: production
deploy_to: /srv/www/alaveteli_staging
+ daemon_name: alaveteli_staging
diff --git a/config/general.yml-example b/config/general.yml-example
index 1f126c5a5..8acea374b 100644
--- a/config/general.yml-example
+++ b/config/general.yml-example
@@ -416,7 +416,7 @@ READ_ONLY: ''
# STAGING_SITE: 0
#
# ---
-STAGING_SITE: 0
+STAGING_SITE: 1
# Recaptcha, for detecting humans. Get keys here:
# http://recaptcha.net/whyrecaptcha.html
diff --git a/config/initializers/alaveteli.rb b/config/initializers/alaveteli.rb
index 840639228..c39e7a117 100644
--- a/config/initializers/alaveteli.rb
+++ b/config/initializers/alaveteli.rb
@@ -10,7 +10,7 @@ load "debug_helpers.rb"
load "util.rb"
# Application version
-ALAVETELI_VERSION = '0.20.0.14'
+ALAVETELI_VERSION = '0.21.0.10'
# Add new inflection rules using the following format
# (all these examples are active by default):
diff --git a/config/initializers/missing_source_file.rb b/config/initializers/missing_source_file.rb
deleted file mode 100644
index a114fa972..000000000
--- a/config/initializers/missing_source_file.rb
+++ /dev/null
@@ -1,2 +0,0 @@
-# For Rails 2.3 on Ruby 1.9.3 @see https://github.com/rails/rails/pull/3745
-MissingSourceFile::REGEXPS << [/^cannot load such file -- (.+)$/i, 1]
diff --git a/config/sysvinit-thin.ugly b/config/sysvinit-thin.ugly
index b333f3738..0155ff8c3 100755
--- a/config/sysvinit-thin.ugly
+++ b/config/sysvinit-thin.ugly
@@ -22,7 +22,13 @@ RAILS_ENV=!!(*= $rails_env *)!!
set -e
# Check that the Daemon can be run
-su -l -c "cd $SITE_HOME && bundle exec thin --version &> /dev/null || exit 0" $USER
+CURRENT_USER=$(whoami)
+if [ "$CURRENT_USER" = "$USER" ]
+ then
+ cd $SITE_HOME && bundle exec thin --version > /dev/null 2>&1 || exit 0
+ else
+ su -l -c "cd $SITE_HOME && bundle exec thin --version &> /dev/null || exit 0" $USER
+fi
start_daemon() {
echo -n "Starting $DESC: "