Class: Vx::Builder::Script::Services
- Inherits:
-
Struct
- Object
- Struct
- Vx::Builder::Script::Services
- Includes:
- Helper::TraceShCommand
- Defined in:
- lib/vx/builder/script/services.rb
Constant Summary collapse
- ALIASES =
{ 'rabbitmq' => 'rabbitmq-server' }
Instance Attribute Summary collapse
-
#app ⇒ Object
Returns the value of attribute app.
Instance Method Summary collapse
Methods included from Helper::TraceShCommand
Instance Attribute Details
#app ⇒ Object
Returns the value of attribute app
5 6 7 |
# File 'lib/vx/builder/script/services.rb', line 5 def app @app end |
Instance Method Details
#call(env) ⇒ Object
13 14 15 16 17 18 19 20 21 22 23 |
# File 'lib/vx/builder/script/services.rb', line 13 def call(env) env.source.services.each do |srv| srv = ALIASES[srv] || srv env.init << trace_sh_command("sudo service #{srv} start") end unless env.source.services.empty? env.init << trace_sh_command("sleep 3") end app.call(env) end |