73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
|
# File 'lib/rails-installer/web-servers.rb', line 73
def self.start(installer, foreground)
args = {}
args['-p'] = installer.config['port-number']
args['-a'] = installer.config['bind-address']
args['-e'] = installer.config['rails-environment']
args['-N'] = installer.config['threads']
args['--prefix'] = installer.config['url-prefix']
args.delete_if {|k,v| v==nil}
args_array = args.to_a.flatten.map {|e| e.to_s}
args_array = ['mongrel_rails', 'cluster::configure'] + args_array
installer.message "Configuring mongrel_cluster for #{installer.app_name.capitalize}"
in_directory installer.install_directory do
system(args_array.join(' '))
end
installer.message "Starting #{installer.app_name.capitalize} on port #{installer.config['port-number']}"
in_directory installer.install_directory do
system('mongrel_rails cluster::start')
end
end
|