lib/shared/pe_status_check.rb
def service_running_enabled(name, service = nil)
    service ||= get_resource('service', name)
    return false if service.nil?

    service_running(name, service) and service_enabled(name, service)
  end
# Check if the service is running and enabled
# @param name [String] The name of the service
# @param service [Puppet::Resource] An optional service resource to use
# @return [Boolean] True if the service is running and enabled
Check if the service is running and enabled
Check if the service is running and enabled
def service_running_enabled(name, service = nil)
    service ||= get_resource('service', name)
    return false if service.nil?
    service_running(name, service) and service_enabled(name, service)
  end
def service_running_enabled ( name , service = nil ) service ||= get_resource ( 'service' , name ) return false if service . nil? service_running ( name , service ) and service_enabled ( name , service ) end
Check if the service is running and enabled
Check if the service is running and enabled
True if the service is running and enabled
True if the service is running and enabled
Boolean
name
The name of the service
The name of the service
service
An optional service resource to use
An optional service resource to use