aboutsummaryrefslogtreecommitdiffstats
path: root/script
Commit message (Collapse)AuthorAgeLines
* Merge branch 'install-script' into rails-3-developMark Longair2013-11-07-43/+354
|\
| * Set 'constraint_disabling: false' for tests in database.ymlMark Longair2013-11-07-0/+1
| | | | | | | | | | Without this setting, the PostgreSQL user still has to be a superuser for the tests to work without constraint disabling errors.
| * Rename /etc/postfix/regexp to /etc/postfix/transportsMark Longair2013-11-07-8/+7
| | | | | | | | | | | | | | | | This seems slightly less confusing, since both this file and /etc/postfix/recipients contain regexp patterns. This also switches to replacing any transport_maps file that was in use and overwrites the existing file rather than modifying it.
| * Reduce "backscatter" bounce risk by setting local_recipient_mapsMark Longair2013-11-07-1/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Leaving the local_recipient_maps setting empty has a risk which is described in the Postfix manual: "[...] That is, an empty value. With this setting, the Postfix SMTP server will not reject mail with "User unknown in local recipient table". Don't do this on systems that receive mail directly from the Internet. With today's worms and viruses, Postfix will become a backscatter source: it accepts mail for non-existent recipients and then tries to return that mail as "undeliverable" to the often forged sender address." This commit changes the local_recipient_maps setting to only accept (and potentially bounce) emails where the local part is known (one that we've mentioned in general.yml) or to a Unix user that exists. Fixes #1166
| * Invoke commands as the unprivileged user in a login shellMark Longair2013-11-07-3/+3
| | | | | | | | | | | | | | On some setups, the unprivileged user's .bashrc file won't be sourced unless you've started a login shell - we need that to be sourced to add the gem's bin directory to the PATH, or "bundle" won't be found, for example.
| * Remove make-crontab and update INSTALL.mdMark Longair2013-11-07-16/+0
| | | | | | | | | | | | The make-crontab script is now redundant, so instead direct people to use the config_files:convert_crontab rake task for generating a crontab file.
| * Add a rake task to rewrite the crontab-example fileMark Longair2013-11-07-4/+5
| | | | | | | | | | | | As suggested by Louise Crow, this new rake task reuses the convert_ugly function to rewrite the crontab-example file into a usable crontab file.
| * Switch to using 'rake config_files:convert_init_script'Mark Longair2013-11-07-6/+3
| | | | | | | | | | | | Rather than reimplement the processing of the ugly file with sed, we can use the existing rake task for rewriting config/alert-tracks-debian.ugly.
| * If the origin/install-script branch exists, use that in preferenceMark Longair2013-11-07-7/+4
| | | | | | | | | | | | Once merged to master we can remove origin/install-script, but development is awkward without it. This commit also makes it easy to have an arbitrary number of fallbacks.
| * We don't use foi-purge-varnish ourselves, so remove itMark Longair2013-10-31-7/+1
| | | | | | | | | | | | We had various problems with the foi-purge-varnish script ourselves that led to us removing it, so it seems like a bad idea to be implicitly suggesting that others should use it.
| * Drop PostgreSQL superuser permissions after loading sample dataMark Longair2013-10-31-0/+6
| |
| * Add install scripts for AlaveteliMark Longair2013-10-31-0/+319
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | site-specific-install.sh will be called by our generic site install script in commonlib/bin/install-site.sh These scripts assume that you have a new installation of Debian squeeze or Ubuntu precise and then will set up: - Alaveteli running in development mode with the Thin web server behing nginx - The cron jobs that are required for the site to work. - A basic Postfix configuration for sending and receiving mail. We also will use this script for generating new AMIs (Amazon Machin Images) for Alaveteli. The general.yml configuration file will be created if it doesn't exist, but if there is an existing copy it won't be overwritten, so it should be safe to customize that file and then re-run the install script.
| * Deal with ../logs existing, and log not being a symlinkMark Longair2013-10-29-2/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The rails-post-deploy script would error if the log directory existed (rather than being a symlink to another directory, for example) and the ../logs directory also existed. This commit changes this behaviour to move the existing log directory out of the way in this case. In addition, this commit switches from removing the old symlink and creating a new one (which creates a gap in time during which the log directory doesn't exist) to using "ln -snf" to just overwrite any existing symlink or file. (Note that this is still not an atomic operation, but it's bound to leave less time between removal and creation.)
| * Normalize whitespace in rails-post-deployMark Longair2013-10-29-27/+27
| | | | | | | | | | | | | | | | | | The rails-post-deploy script unfortunately uses a mixtures of spaces and 0x09 to represent indentation, so it's not even clear what local convention to follow. It appears from the mixture that the intention is that the tabs should represent 4 spaces, so this commit replaces them, strips trailing whitespace and changes some non-standard indentation at the end of a bash heredoc.
* | Add a script to help switch theme for local developmentMark Longair2013-10-30-0/+120
|/ | | | | | | | | | | | | | | | When working locally, it's useful to be able to switch between themes quickly, which essentially involves: - Updating the general.yml symlink to point to a theme-specific one - Updating the public/alavetelitheme symlink - Making sure that the theme exists as vendor/plugins/<theme-name> This script lets you switch between themes kept in a directory which is by default called 'alaveteli-themes' at the same level as your Alaveteli git repository, or can be overriden by the environment variable ALAVETELI_THEMES_DIR.
* Merge branch 'feature/hide-individual-responses' into rails-3-developLouise Crow2013-09-17-6/+0
|\ | | | | | | | | | | | | | | | | | | | | Conflicts: Gemfile app/views/admin_request/edit_outgoing.html.erb config/packages doc/CHANGES.md doc/INSTALL.md spec/models/info_request_spec.rb spec/models/public_body_spec.rb
| * Don't make zip dir publicly accessible.Louise Crow2013-09-16-6/+0
| | | | | | | | We want to be able to authorise access to it.
* | Remove obsolete script.Louise Crow2013-09-12-22/+0
| |
* | Put rake in silent mode when run from cronLouise Crow2013-09-05-1/+1
| |
* | Add bash script for updating body stats from cron.Louise Crow2013-09-05-0/+4
| |
* | Run migrations before trying to install themeIan Chard2013-08-14-3/+1
| | | | | | | | | | | | Conflicts: script/rails-post-deploy
* | Clean up paths to be a bit less OS dependent.Louise Crow2013-08-12-6/+4
| |
* | Add a rake task to print a warning if the state of a submodule is not what ↵Louise Crow2013-07-30-0/+2
|/ | | | we expect it to be.
* Use first argument to script when not running in daemon mode. Fixes #1023.Louise Crow2013-07-30-1/+1
|
* Move crontab.ugly to crontab-exampleLouise Crow2013-06-12-1/+1
|
* Now that we removed the readlink command to allow rails-post-deploy to be ↵hotfix/0.11.0.10Louise Crow2013-06-12-1/+1
| | | | easily run on e.g. OSX, use a relative path for the softlink.
* Replace backticks with call to exec(), the former spawns a new process, and ↵Louise Crow2013-06-03-2/+3
| | | | the latter replaces the current process. In the daemon context we care about the process id so that calls to startstopdaemon won't spawn a new daemon.
* Now that runner is invoked via the rails command and not directly from the ↵Louise Crow2013-05-29-24/+32
| | | | script directory, it's more important to cd to the app directory in order to pick up the bundler gemfile. Fixes #964.
* Revert "Remove setting of internal and external encodings for ruby 1.9 - as ↵Louise Crow2013-05-28-0/+4
| | | | | | per 512d8e3d1845e327740acc2f7326e72b23d0d604, this is already the default in Rails 3." <- Although this is the default in Rails, Rails isn't loaded at this point in the script. This reverts commit 6124624f4035e74eb79f1e93f26d5584ed3e2fa1.
* Restore load of config (AlaveteliConfiguration is required in forward_on) - ↵Louise Crow2013-05-08-0/+4
| | | | update config to avoid redefinition of constant warnings.
* Remove setting of internal and external encodings for ruby 1.9 - as per ↵Louise Crow2013-04-30-4/+0
| | | | 512d8e3d1845e327740acc2f7326e72b23d0d604, this is already the default in Rails 3.
* In the mailin script, run "rails runner" with "bundle exec"Mark Longair2013-04-15-1/+1
| | | | | | | The example usages in the documentation all refer to the mailin script without a "bundle exec" prefix, so with bundler-based installation these examples may not work without a "bundle exec" being used in the script.
* Enable rails-post-deploy to be run from any directoryMark Longair2013-04-02-2/+7
| | | | | | | The BASH_SOURCE variable reliably gives the path of the script, so we can make the script work regardless of what the current working directory is on running the script.
* Change email address in header of source code to hello@mysociety.orgMatthew Landauer2013-03-26-3/+3
|
* Stop AlaveteliConfiguration class being loaded twiceMatthew Landauer2013-03-19-4/+0
|
* This won't work anymore so remove itHenare Degan2013-03-16-8/+0
|
* autospec wasn't working so remove until someone complains. Closes #824Henare Degan2013-03-16-6/+0
|
* Merge remote-tracking branch 'mysociety/develop' into rails-3-developHenare Degan2013-03-14-1/+1
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: Gemfile Gemfile.lock app/controllers/admin_request_controller.rb app/controllers/admin_track_controller.rb app/controllers/request_controller.rb app/controllers/services_controller.rb app/helpers/link_to_helper.rb app/mailers/request_mailer.rb app/models/application_mailer.rb app/models/info_request.rb app/views/admin_censor_rule/edit.html.erb app/views/admin_censor_rule/new.html.erb app/views/admin_public_body/_form.html.erb app/views/admin_public_body/_locale_selector.html.erb app/views/admin_public_body/_one_list.html.erb app/views/admin_public_body/edit.html.erb app/views/admin_public_body/list.html.erb app/views/admin_public_body/new.html.erb app/views/admin_request/_incoming_message_actions.html.erb app/views/admin_request/edit.html.erb app/views/admin_request/edit_comment.html.erb app/views/admin_request/edit_outgoing.html.erb app/views/admin_request/list.html.erb app/views/admin_request/list_old_unclassified.html.erb app/views/admin_request/show.html.erb app/views/admin_track/_some_tracks.html.erb app/views/admin_track/list.html.erb app/views/admin_user/edit.html.erb app/views/admin_user/list.html.erb app/views/admin_user/show.html.erb app/views/general/_footer.html.erb app/views/general/exception_caught.html.erb app/views/help/contact.html.erb app/views/layouts/default.html.erb app/views/public_body/_alphabet.html.erb app/views/request/_request_listing_single.html.erb app/views/request/_sidebar.html.erb app/views/request/new.html.erb app/views/request/show.html.erb app/views/request_mailer/external_response.rhtml app/views/request_mailer/fake_response.rhtml config/environment.rb config/environments/production.rb config/routes.rb spec/controllers/admin_censor_rule_controller_spec.rb spec/controllers/request_controller_spec.rb spec/controllers/track_controller_spec.rb spec/helpers/link_to_helper_spec.rb spec/mailers/request_mailer_spec.rb spec/models/info_request_spec.rb spec/spec_helper.rb spec/views/public_body/show.html.erb_spec.rb spec/views/request/show.html.erb_spec.rb vendor/plugins/rails_xss/lib/rails_xss/erubis.rb
| * Move test runner disabling to request mailer in order to have access to ↵Louise Crow2013-02-19-5/+1
| | | | | | | | rails environment and make hack specific to ruby 1.9.
| * Prevent Autorunner from test-unit from hooking into the exit of script/runnerLouise Crow2013-02-17-2/+6
| |
* | Revert "Remove unused script" - It is used you insensitive clod!Henare Degan2013-03-06-0/+4
| | | | | | | | This reverts commit 13e2ee3ee80d8a768ebd0ab12aed5421e6368463.
* | Fixtures is namespaced in ActiveRecord nowHenare Degan2013-03-05-2/+2
| |
* | Rename Configuration class to avoid conflict with ActiveSupport::ConfigurableHenare Degan2013-03-03-1/+1
| |
* | Specify the full path as Ruby 1.9.3 doesn't include the current directory in ↵Henare Degan2013-02-20-2/+2
| | | | | | | | the load path
* | Upgrade script script/runner by Doing The Dumb Thing. #822Henare Degan2013-02-20-3/+2
| |
* | Shouldn't be needed as we use TravisHenare Degan2013-02-19-5/+0
| |
* | Use Spork instead of writing our ownHenare Degan2013-02-19-116/+0
| |
* | Upgrade script script/stop-new-responses-on-old-requestsHenare Degan2013-02-19-5/+1
| |
* | This is what 'config.order' is forHenare Degan2013-02-19-81/+0
| |
* | Remove unnecessary scriptHenare Degan2013-02-19-10/+0
| |