Sha256: 73c9bcfe91a036b602146c7fabb91a347775d639ce26371a838c10f472cdffad

Contents?: true

Size: 518 Bytes

Versions: 76

Compression:

Stored size: 518 Bytes

Contents

module Vx
  module Builder
    class ScriptBuilder

      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

76 entries across 76 versions & 1 rubygems

Version Path
vx-builder-0.5.61 lib/vx/builder/script_builder/services.rb
vx-builder-0.5.60 lib/vx/builder/script_builder/services.rb
vx-builder-0.5.59 lib/vx/builder/script_builder/services.rb
vx-builder-0.5.58 lib/vx/builder/script_builder/services.rb
vx-builder-0.5.57 lib/vx/builder/script_builder/services.rb
vx-builder-0.5.56 lib/vx/builder/script_builder/services.rb
vx-builder-0.5.55 lib/vx/builder/script_builder/services.rb
vx-builder-0.5.54 lib/vx/builder/script_builder/services.rb
vx-builder-0.5.53 lib/vx/builder/script_builder/services.rb
vx-builder-0.5.52 lib/vx/builder/script_builder/services.rb
vx-builder-0.5.51 lib/vx/builder/script_builder/services.rb
vx-builder-0.5.50 lib/vx/builder/script_builder/services.rb
vx-builder-0.5.49 lib/vx/builder/script_builder/services.rb
vx-builder-0.5.48 lib/vx/builder/script_builder/services.rb
vx-builder-0.5.47 lib/vx/builder/script_builder/services.rb
vx-builder-0.5.46 lib/vx/builder/script_builder/services.rb
vx-builder-0.5.45 lib/vx/builder/script_builder/services.rb
vx-builder-0.5.44 lib/vx/builder/script_builder/services.rb
vx-builder-0.5.43 lib/vx/builder/script_builder/services.rb
vx-builder-0.5.42 lib/vx/builder/script_builder/services.rb