80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
|
# File 'lib/mongrel_config/win32_app.rb', line 80
def post
options = []
if bad?(input.service_name) or bad?(input.root) or bad?(input.environment) or bad?(input.address) or bad?(input.port)
@result = "ERROR: You must fill out all mandatory (*) fields."
render :install_result
else
options << ["-n", input.service_name]
options << ["-r", '"' + input.root + '"']
options << ["-e", input.environment]
options << ["-b", input.address]
options << ["-p", input.port]
options << ["-d", input.display_name] if good? input.display_name
options << ["-m", '"' + input.mime + '"'] if good? input.mime
options << ["-P", input.num_procs] if good? input.num_procs
options << ["-t", input.timeout] if good? input.timeout
options << ["-c", input.cpu] if good? input.cpu
begin
@result = `ruby #$mongrel_rails_service install #{options.join(' ')}`
$service_logs << @result
rescue
@result = "Failed to start #{input.service_name}: #$!"
$service_logs << @result
end
render :install_result
end
end
|