lib/foreman/engine.rb in foreman-0.46.0-java vs lib/foreman/engine.rb in foreman-0.47.0
- old
+ new
@@ -34,10 +34,11 @@
proctitle "ruby: foreman master"
termtitle "#{File.basename(@directory)} - foreman"
trap("TERM") { puts "SIGTERM received"; terminate_gracefully }
trap("INT") { puts "SIGINT received"; terminate_gracefully }
+ trap("HUP") { puts "SIGHUP received"; terminate_gracefully }
assign_colors
spawn_processes
watch_for_output
watch_for_termination
@@ -82,10 +83,10 @@
end
end
end
def base_port
- options[:port] || 5000
+ options[:port] || environment["PORT"] || ENV["PORT"] || 5000
end
def kill_all(signal="SIGTERM")
running_processes.each do |pid, process|
info "sending #{signal} to pid #{pid}"