Class: PoiseService::ServiceProviders::SolarisService
- Inherits:
-
Base
- Object
- Base
- PoiseService::ServiceProviders::SolarisService
- Includes:
- Chef::Mixin::ShellOut
- Defined in:
- lib/poise_service/solaris/provider.rb
Overview
Poise-service provider for Solaris.
Class Method Summary collapse
Instance Method Summary collapse
-
#pid ⇒ Integer
Parse the PID from ‘svcs -p <name>` output.
Class Method Details
.provides_auto?(node, _) ⇒ Boolean
25 26 27 |
# File 'lib/poise_service/solaris/provider.rb', line 25 def self.provides_auto?(node, _) node['platform_family'] == 'solaris2' end |
Instance Method Details
#pid ⇒ Integer
Parse the PID from ‘svcs -p <name>` output.
31 32 33 34 |
# File 'lib/poise_service/solaris/provider.rb', line 31 def pid service = shell_out!("svcs -p #{@new_resource.service_name}").stdout service.split(' ')[-1].to_i end |