aboutsummaryrefslogtreecommitdiffstats
path: root/config
diff options
context:
space:
mode:
Diffstat (limited to 'config')
-rwxr-xr-xconfig/alert-tracks-debian.ugly13
-rw-r--r--config/deploy.rb2
-rw-r--r--config/general.yml-example1
-rw-r--r--config/packages54
-rw-r--r--config/packages.debian-squeeze57
-rw-r--r--config/packages.debian-wheezy50
-rw-r--r--config/packages.ubuntu-precise48
-rwxr-xr-x[-rw-r--r--]config/purge-varnish-debian.ugly12
-rw-r--r--config/routes.rb1
9 files changed, 127 insertions, 111 deletions
diff --git a/config/alert-tracks-debian.ugly b/config/alert-tracks-debian.ugly
index c7d82d8c8..f1ca68b03 100755
--- a/config/alert-tracks-debian.ugly
+++ b/config/alert-tracks-debian.ugly
@@ -13,10 +13,12 @@
# !!(*= $daemon_name *)!! Start the Alaveteli email alert daemon
NAME=!!(*= $daemon_name *)!!
-DAEMON=!!(*= $vhost_dir *)!!/alaveteli/script/runner
+DAEMON=!!(*= $vhost_dir *)!!/!!(*= $vcspath *)!!/script/runner
DAEMON_ARGS="--daemon TrackMailer.alert_tracks_loop"
-PIDFILE=!!(*= $vhost_dir *)!!/alert-tracks.pid
-LOGFILE=!!(*= $vhost_dir *)!!/alaveteli/log/alert-tracks.log
+PIDDIR=!!(*= $vhost_dir *)!!/!!(*= $vcspath *)!!/tmp/pids
+PIDFILE=$PIDDIR/!!(*= $daemon_name *)!!.pid
+LOGDIR=!!(*= $vhost_dir *)!!/!!(*= $vcspath *)!!/log
+LOGFILE=$LOGDIR/!!(*= $daemon_name *)!!.log
DUSER=!!(*= $user *)!!
# Set RAILS_ENV - not needed if using config/rails_env.rb
# RAILS_ENV=your_rails_env
@@ -27,10 +29,14 @@ trap "" 1
export PIDFILE LOGFILE
quietly_start_daemon() {
+ mkdir -p {$LOGDIR,$PIDDIR}
+ chown $DUSER:$DUSER {$LOGDIR,$PIDDIR}
/sbin/start-stop-daemon --quiet --start --pidfile "$PIDFILE" --chuid "$DUSER" --startas "$DAEMON" -- $DAEMON_ARGS
}
start_daemon() {
+ mkdir -p {$LOGDIR,$PIDDIR}
+ chown $DUSER:$DUSER {$LOGDIR,$PIDDIR}
/sbin/start-stop-daemon --start --pidfile "$PIDFILE" --chuid "$DUSER" --startas "$DAEMON" -- $DAEMON_ARGS
}
@@ -81,4 +87,3 @@ else
echo " failed"
exit 1
fi
-
diff --git a/config/deploy.rb b/config/deploy.rb
index 9cc847dba..afc586ecf 100644
--- a/config/deploy.rb
+++ b/config/deploy.rb
@@ -57,6 +57,7 @@ namespace :deploy do
"#{release_path}/files" => "#{shared_path}/files",
"#{release_path}/cache" => "#{shared_path}/cache",
"#{release_path}/log" => "#{shared_path}/log",
+ "#{release_path}/tmp/pids" => "#{shared_path}/tmp/pids",
"#{release_path}/lib/acts_as_xapian/xapiandbs" => "#{shared_path}/xapiandbs",
}
@@ -68,6 +69,7 @@ namespace :deploy do
run "mkdir -p #{shared_path}/files"
run "mkdir -p #{shared_path}/cache"
run "mkdir -p #{shared_path}/log"
+ run "mkdir -p #{shared_path}/tmp/pids"
run "mkdir -p #{shared_path}/xapiandbs"
end
end
diff --git a/config/general.yml-example b/config/general.yml-example
index a6f68c52e..0f32f6192 100644
--- a/config/general.yml-example
+++ b/config/general.yml-example
@@ -246,6 +246,7 @@ SHARED_DIRECTORIES:
- cache/
- lib/acts_as_xapian/xapiandbs/
- log/
+ - tmp/pids
- vendor/bundle
- public/assets
diff --git a/config/packages b/config/packages
index fda09cbc1..200a8c34f 100644
--- a/config/packages
+++ b/config/packages
@@ -1,42 +1,42 @@
# please note that this package list currently forms part of the
# mysociety deployment infrastructure -- please discuss on the
# alavateli mailing list if you want to change it
-ruby1.8
-ruby
-rdoc | rdoc1.8
-irb | irb1.8
-wv
-poppler-utils
-pdftk (>> 1.41+dfsg-1) | pdftk (<< 1.41+dfsg-1) # that version has a non-functionining uncompress option
-ghostscript
+build-essential
+bundler
catdoc
-links
elinks
-unrtf
-xlhtml
-xapian-tools
-gnuplot-nox
-php5-cli
-sharutils
-unzip
-mutt
-tnef (>= 1.4.5)
gettext
-python-yaml
-wkhtmltopdf-static
+ghostscript
+gnuplot-nox
+irb | irb1.8
+libicu-dev
libmagic-dev
libmagickwand-dev
libpq-dev
+libsqlite3-dev
libxml2-dev
libxslt-dev
-uuid-dev
+links
+memcached
+mutt
+pdftk (>> 1.41+dfsg-1) | pdftk (<< 1.41+dfsg-1) # that version has a non-functionining uncompress option
+php5-cli
+poppler-utils
+python-yaml
+rake (>= 0.9.2.2)
+rdoc | rdoc1.8
+ruby
+ruby1.8
ruby1.8-dev
rubygems (>= 1.8.15)
-rake (>= 0.9.2.2)
-build-essential
-bundler
+sharutils
sqlite3
-libsqlite3-dev
-libicu-dev
-memcached
+tnef (>= 1.4.5)
ttf-bitstream-vera
+unrtf
+unzip
+uuid-dev
+wkhtmltopdf-static
+wv
+xapian-tools
+xlhtml
diff --git a/config/packages.debian-squeeze b/config/packages.debian-squeeze
index d82d66324..52bdbc376 100644
--- a/config/packages.debian-squeeze
+++ b/config/packages.debian-squeeze
@@ -1,40 +1,41 @@
-ruby1.8
-ruby
-libruby1.8
-rdoc1.8
-irb1.8
-wv
-poppler-utils
-pdftk
-ghostscript
+build-essential
+bundler
catdoc
-links
elinks
-unrtf
-xlhtml
-xapian-tools
-gnuplot-nox
-php5-cli
-sharutils
-unzip
-mutt
-tnef
gettext
-python-yaml
-wkhtmltopdf-static
+ghostscript
+gnuplot-nox
+irb1.8
+libicu-dev
libmagic-dev
libmagickwand-dev
libpq-dev
+libruby1.8
+libsqlite3-dev
libxml2-dev
libxslt-dev
-uuid-dev
+links
+mutt
+pdftk
+php5-cli
+poppler-utils
+postgresql
+postgresql-client
+python-yaml
+rake
+rdoc1.8
+ruby
+ruby1.8
ruby1.8-dev
rubygems/squeeze-backports
-rake
-build-essential
+sharutils
sqlite3
-libsqlite3-dev
-libicu-dev
-postgresql
-postgresql-client
+tnef
ttf-bitstream-vera
+unrtf
+unzip
+uuid-dev
+wkhtmltopdf-static
+wv
+xapian-tools
+xlhtml
diff --git a/config/packages.debian-wheezy b/config/packages.debian-wheezy
index 509cde56e..381e25daa 100644
--- a/config/packages.debian-wheezy
+++ b/config/packages.debian-wheezy
@@ -1,36 +1,36 @@
-ruby1.9.3
-wv
-poppler-utils
-pdftk
-ghostscript
+build-essential
+bundler
catdoc
-links
elinks
-unrtf
-xlhtml
-xapian-tools
-gnuplot-nox
-php5-cli
-sharutils
-unzip
-mutt
-tnef
gettext
-python-yaml
-wkhtmltopdf-static
+ghostscript
+gnuplot-nox
+libicu-dev
libmagic-dev
libmagickwand-dev
libpq-dev
+libsqlite3-dev
libxml2-dev
libxslt-dev
-uuid-dev
+links
+mutt
+pdftk
+php5-cli
+poppler-utils
+postgresql
+postgresql-client
+python-yaml
+rake
ruby-dev
+ruby1.9.3
rubygems
-rake
-build-essential
-bundler
+sharutils
sqlite3
-libsqlite3-dev
-libicu-dev
-postgresql
-postgresql-client
+tnef
+unrtf
+unzip
+uuid-dev
+wkhtmltopdf-static
+wv
+xapian-tools
+xlhtml
diff --git a/config/packages.ubuntu-precise b/config/packages.ubuntu-precise
index 68911359a..87b9591bf 100644
--- a/config/packages.ubuntu-precise
+++ b/config/packages.ubuntu-precise
@@ -1,36 +1,36 @@
-ruby1.9.1
-wv
-poppler-utils
-pdftk
-ghostscript
+build-essential
catdoc
-links
elinks
-unrtf
-xlhtml
-xapian-tools
-gnuplot-nox
-sharutils
-unzip
-mutt
-tnef
gettext
-python-yaml
-wkhtmltopdf-static
+ghostscript
+gnuplot-nox
+libicu-dev
libmagic-dev
libmagickwand-dev
libpq-dev
+libsqlite3-dev
libxml2-dev
libxslt1-dev
-uuid-dev
-ruby1.9.1-dev
-rubygems
+links
+mutt
+pdftk
+poppler-utils
+postgresql
+postgresql-client
+python-yaml
rake
-build-essential
ruby-bundler
+ruby1.9.1
+ruby1.9.1-dev
+rubygems
+sharutils
sqlite3
-libsqlite3-dev
-libicu-dev
-postgresql
-postgresql-client
+tnef
ttf-bitstream-vera
+unrtf
+unzip
+uuid-dev
+wkhtmltopdf-static
+wv
+xapian-tools
+xlhtml
diff --git a/config/purge-varnish-debian.ugly b/config/purge-varnish-debian.ugly
index ebd4d9e5c..dc3f74ff6 100644..100755
--- a/config/purge-varnish-debian.ugly
+++ b/config/purge-varnish-debian.ugly
@@ -13,10 +13,12 @@
# !!(*= $daemon_name *)!! Start the Alaveteli email purge-varnish daemon
NAME=!!(*= $daemon_name *)!!
-DAEMON=!!(*= $vhost_dir *)!!/alaveteli/script/runner
+DAEMON=!!(*= $vhost_dir *)!!/!!(*= $vcspath *)!!/script/runner
DAEMON_ARGS="--daemon PurgeRequest.purge_all_loop"
-PIDFILE=!!(*= $vhost_dir *)!!/purge-varnish.pid
-LOGFILE=!!(*= $vhost_dir *)!!/alaveteli/log/purge-varnish.log
+PIDDIR=!!(*= $vhost_dir *)!!/!!(*= $vcspath *)!!/tmp/pids
+PIDFILE=$PIDDIR/!!(*= $daemon_name *)!!.pid
+LOGDIR=!!(*= $vhost_dir *)!!/!!(*= $vcspath *)!!/log
+LOGFILE=$LOGDIR/!!(*= $daemon_name *)!!.log
DUSER=!!(*= $user *)!!
# Set RAILS_ENV - not needed if using config/rails_env.rb
# RAILS_ENV=your_rails_env
@@ -29,10 +31,14 @@ trap "" 1
export PIDFILE LOGFILE
quietly_start_daemon() {
+ mkdir -p {$LOGDIR,$PIDDIR}
+ chown $DUSER:$DUSER {$LOGDIR,$PIDDIR}
/sbin/start-stop-daemon --quiet --start --pidfile "$PIDFILE" --chuid "$DUSER" --startas "$DAEMON" -- $DAEMON_ARGS
}
start_daemon() {
+ mkdir -p {$LOGDIR,$PIDDIR}
+ chown $DUSER:$DUSER {$LOGDIR,$PIDDIR}
/sbin/start-stop-daemon --start --pidfile "$PIDFILE" --chuid "$DUSER" --startas "$DAEMON" -- $DAEMON_ARGS
}
diff --git a/config/routes.rb b/config/routes.rb
index 7cc85c974..9f426fabf 100644
--- a/config/routes.rb
+++ b/config/routes.rb
@@ -261,6 +261,7 @@ Alaveteli::Application.routes.draw do
match '/api/v2/request/:id.json' => 'api#show_request', :as => :api_show_request, :via => :get
match '/api/v2/request/:id.json' => 'api#add_correspondence', :as => :api_add_correspondence, :via => :post
+ match '/api/v2/request/:id/update.json' => 'api#update_state', :as => :api_update_state, :via => :post
match '/api/v2/body/:id/request_events.:feed_type' => 'api#body_request_events', :as => :api_body_request_events, :feed_type => '^(json|atom)$'
####