Sha256: 08c1e6561cd7cbda72f5916a70bcf48a24b229f846a04eb79c82d91529df95be
Contents?: true
Size: 581 Bytes
Versions: 9
Compression:
Stored size: 581 Bytes
Contents
class Specinfra::Command::Solaris::Base::Service < Specinfra::Command::Base::Service 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
Version data entries
9 entries across 9 versions & 1 rubygems