Skip to content

Commit

Permalink
Merge branch 'experimental' into wip-jeweller
Browse files Browse the repository at this point in the history
* experimental:
  Restart god after changing RAILS_ENV because god stores the value of RAILS_ENV and uses it in notifications.
  • Loading branch information
pauldowman committed Oct 22, 2009
2 parents 3586549 + 76c67c8 commit 9a9bab5
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions server/files/usr/local/ec2onrails/bin/set_rails_env
Expand Up @@ -23,6 +23,8 @@

require "yaml"
require "erb"
require "#{File.dirname(__FILE__)}/../lib/utils"


if ARGV.length != 1
puts "usage: set_rails_env <value>"
Expand All @@ -34,3 +36,8 @@ end
File.open("/etc/ec2onrails/rails_env", 'w') do |f|
f << @rails_env
end

# Tell god to quit, which will cause it to be restarted immediately by init.
# When it restarts it keeps it's monitoring state. This causes it to reload
# it's idea of RAILS_ENV because it's used in notifications.
Utils.run "god quit"

0 comments on commit 9a9bab5

Please sign in to comment.