lib/shared/pe_status_check.rb
# Check if the service is 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 enabled
Check if the service is enabled
Check if the service is enabled
def service_enabled(name, service = nil)
    service ||= get_resource('service', name)
    return false if service.nil?
    service[:enable].to_s.casecmp('true').zero?
  end
def service_enabled ( name , service = nil ) service ||= get_resource ( 'service' , name ) return false if service . nil? service [ :enable ] . to_s . casecmp ( 'true' ) . zero? end
Check if the service is enabled
Check if the service is enabled
True if the service is enabled
True if the service is 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