Class: Specinfra::Command::Smartos::Base::Service
- Inherits:
-
Specinfra::Command::Solaris::Base::Service
- Object
- Base
- Base::Service
- Specinfra::Command::Solaris::Base::Service
- Specinfra::Command::Smartos::Base::Service
- Defined in:
- lib/specinfra/command/smartos/base/service.rb
Class Method Summary collapse
Methods inherited from Specinfra::Command::Solaris::Base::Service
check_has_property, check_running
Methods inherited from Base::Service
check_is_monitored_by_god, check_is_monitored_by_monit, check_is_running_under_supervisor, check_is_running_under_upstart
Methods inherited from Base
Class Method Details
.check_is_enabled(service, level = nil) ⇒ Object
3 4 5 |
# File 'lib/specinfra/command/smartos/base/service.rb', line 3 def check_is_enabled(service, level=nil) "svcs -l #{escape(service)} 2> /dev/null | grep -wx '^enabled.*true$'" end |
.check_is_running(service) ⇒ Object
7 8 9 |
# File 'lib/specinfra/command/smartos/base/service.rb', line 7 def check_is_running(service) "svcs -l #{escape(service)} status 2> /dev/null |grep -wx '^state.*online$'" end |