Sha256: d637302fcb51fcbcb019e0339a35d47774c799bbb06a8ba315f2dde968a979c3

Contents?: true

Size: 511 Bytes

Versions: 7

Compression:

Stored size: 511 Bytes

Contents

module Vx
  module Builder
    class Script

      class Services < Base

        ALIASES = {
          'rabbitmq' => 'rabbitmq-server'
        }

        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

      end
    end
  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
vx-builder-0.3.3 lib/vx/builder/script_builder/services.rb-e
vx-builder-0.3.2 lib/vx/builder/script_builder/services.rb-e
vx-builder-0.3.1 lib/vx/builder/script_builder/services.rb-e
vx-builder-0.3.0 lib/vx/builder/script_builder/services.rb-e
vx-builder-0.2.2 lib/vx/builder/script/services.rb
vx-builder-0.2.1 lib/vx/builder/script/services.rb
vx-builder-0.2.0 lib/vx/builder/script/services.rb