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