Class: Chef::Platform::ServiceHelpers

Inherits:
Object
  • Object
show all
Defined in:
lib/chef/platform/service_helpers.rb

Overview

@deprecated, use ChefUtils::DSL::Service instead (via the ChefUtils Universal DSL)

Class Method Summary collapse

Class Method Details

.config_for_service(service_name) ⇒ Object



40
41
42
43
44
45
46
47
48
49
50
# File 'lib/chef/platform/service_helpers.rb', line 40

def config_for_service(service_name)
  configs = []

  configs << :initd if ChefUtils::DSL::Service.service_script_exist?(:initd, service_name)
  configs << :upstart if ChefUtils::DSL::Service.service_script_exist?(:upstart, service_name)
  configs << :xinetd if ChefUtils::DSL::Service.service_script_exist?(:xinetd, service_name)
  configs << :systemd if ChefUtils::DSL::Service.service_script_exist?(:systemd, service_name)
  configs << :etc_rcd if ChefUtils::DSL::Service.service_script_exist?(:etc_rcd, service_name)

  configs
end

.service_resource_providersObject



27
28
29
30
31
32
33
34
35
36
37
38
# File 'lib/chef/platform/service_helpers.rb', line 27

def service_resource_providers
  providers = []

  providers << :debian if ChefUtils::DSL::Service.debianrcd?
  providers << :invokercd if ChefUtils::DSL::Service.invokercd?
  providers << :upstart if ChefUtils::DSL::Service.upstart?
  providers << :insserv if ChefUtils::DSL::Service.insserv?
  providers << :systemd if ChefUtils.systemd?
  providers << :redhat if ChefUtils::DSL::Service.redhatrcd?

  providers
end