Sha256: e1b2711f7943502c1efa11fe2421cbd1c031aec2e5952f1182e7392cd469dfff
Contents?: true
Size: 628 Bytes
Versions: 73
Compression:
Stored size: 628 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_is_running(service) "svcs -H -o state #{escape(service)} 2> /dev/null | egrep '^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
73 entries across 73 versions & 1 rubygems