class Specinfra::Command::Solaris::Base::Service
Public Class Methods
check_has_property(svc, property)
click to toggle source
# File lib/specinfra/command/solaris/base/service.rb, line 11 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
check_is_enabled(service, level=nil)
click to toggle source
# File lib/specinfra/command/solaris/base/service.rb, line 3 def check_is_enabled(service, level=nil) "svcs -l #{escape(service)} 2> /dev/null | egrep '^enabled *true$'" end
check_is_running(service)
click to toggle source
# File lib/specinfra/command/solaris/base/service.rb, line 7 def check_is_running(service) "svcs -H -o state #{escape(service)} 2> /dev/null | egrep '^online$'" end
get_property(service)
click to toggle source
# File lib/specinfra/command/solaris/base/service.rb, line 20 def get_property(service) "svcprop -a #{escape(service)}" end