We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 4bfbc59 commit 76c67c8Copy full SHA for 76c67c8
server/files/usr/local/ec2onrails/bin/set_rails_env
@@ -23,6 +23,8 @@
23
24
require "yaml"
25
require "erb"
26
+require "#{File.dirname(__FILE__)}/../lib/utils"
27
+
28
29
if ARGV.length != 1
30
puts "usage: set_rails_env <value>"
@@ -34,3 +36,8 @@ end
34
36
File.open("/etc/ec2onrails/rails_env", 'w') do |f|
35
37
f << @rails_env
38
end
39
40
+# Tell god to quit, which will cause it to be restarted immediately by init.
41
+# When it restarts it keeps it's monitoring state. This causes it to reload
42
+# it's idea of RAILS_ENV because it's used in notifications.
43
+Utils.run "god quit"
0 commit comments