Sha256: 79832ebfabec92efb119625994045820792d86f4ece2b241158b286f6ec22bb2

Contents?: true

Size: 630 Bytes

Versions: 45

Compression:

Stored size: 630 Bytes

Contents

class Specinfra::Command::Solaris::Base::Service < Specinfra::Command::Base::Service
  class << self
    def check_is_enabled(service, level=nil)
      "svcs -l #{escape(service)} 2> /dev/null | egrep '^enabled *true$'"
    end

    def check_running(service)
      "svcs -l #{escape(service)} status 2> /dev/null | egrep '^state *online$'"
    end

    def check_has_property(svc, property)
      commands = []
      property.sort.each do |key, value|
        regexp = "^#{value}$"
        commands << "svcprop -p #{escape(key)} #{escape(svc)} | grep -- #{escape(regexp)}"
      end
      commands.join(' && ')
    end
  end
end

Version data entries

45 entries across 45 versions & 1 rubygems

Version Path
specinfra-2.2.0 lib/specinfra/command/solaris/base/service.rb
specinfra-2.1.1 lib/specinfra/command/solaris/base/service.rb
specinfra-2.1.0 lib/specinfra/command/solaris/base/service.rb
specinfra-2.0.4 lib/specinfra/command/solaris/base/service.rb
specinfra-2.0.3 lib/specinfra/command/solaris/base/service.rb
specinfra-2.0.2 lib/specinfra/command/solaris/base/service.rb
specinfra-2.0.1 lib/specinfra/command/solaris/base/service.rb
specinfra-2.0.0 lib/specinfra/command/solaris/base/service.rb
specinfra-2.0.0.beta52 lib/specinfra/command/solaris/base/service.rb
specinfra-2.0.0.beta51 lib/specinfra/command/solaris/base/service.rb
specinfra-2.0.0.beta50 lib/specinfra/command/solaris/base/service.rb
specinfra-2.0.0.beta49 lib/specinfra/command/solaris/base/service.rb
specinfra-2.0.0.beta48 lib/specinfra/command/solaris/base/service.rb
specinfra-2.0.0.beta47 lib/specinfra/command/solaris/base/service.rb
specinfra-2.0.0.beta46 lib/specinfra/command/solaris/base/service.rb
specinfra-2.0.0.beta45 lib/specinfra/command/solaris/base/service.rb
specinfra-2.0.0.beta44 lib/specinfra/command/solaris/base/service.rb
specinfra-2.0.0.beta43 lib/specinfra/command/solaris/base/service.rb
specinfra-2.0.0.beta42 lib/specinfra/command/solaris/base/service.rb
specinfra-2.0.0.beta41 lib/specinfra/command/solaris/base/service.rb