summaryrefslogtreecommitdiff
path: root/lib/chef/resource/service.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/chef/resource/service.rb')
-rw-r--r--lib/chef/resource/service.rb54
1 files changed, 27 insertions, 27 deletions
diff --git a/lib/chef/resource/service.rb b/lib/chef/resource/service.rb
index 508ef8e643..f04e7b3c9c 100644
--- a/lib/chef/resource/service.rb
+++ b/lib/chef/resource/service.rb
@@ -31,7 +31,7 @@ class Chef
default_action :nothing
allowed_actions :enable, :disable, :start, :stop, :restart, :reload,
- :mask, :unmask
+ :mask, :unmask
# this is a poor API please do not re-use this pattern
property :supports, Hash, default: { restart: nil, reload: nil, status: nil },
@@ -39,38 +39,38 @@ class Chef
coerce: proc { |x| x.is_a?(Array) ? x.each_with_object({}) { |i, m| m[i] = true } : x }
property :service_name, String,
- description: "An optional property to set the service name if it differs from the resource block's name.",
- name_property: true, identity: true
+ description: "An optional property to set the service name if it differs from the resource block's name.",
+ name_property: true, identity: true
# regex for match against ps -ef when !supports[:has_status] && status == nil
property :pattern, String,
- description: "The pattern to look for in the process table.",
- default_description: "The value provided to 'service_name' or the resource block's name",
- default: lazy { service_name }, desired_state: false
+ description: "The pattern to look for in the process table.",
+ default_description: "The value provided to 'service_name' or the resource block's name",
+ default: lazy { service_name }, desired_state: false
# command to call to start service
property :start_command, [ String, nil, FalseClass ],
- description: "The command used to start a service.",
- desired_state: false
+ description: "The command used to start a service.",
+ desired_state: false
# command to call to stop service
property :stop_command, [ String, nil, FalseClass ],
- description: "The command used to stop a service.",
- desired_state: false
+ description: "The command used to stop a service.",
+ desired_state: false
# command to call to get status of service
property :status_command, [ String, nil, FalseClass ],
- description: "The command used to check the run status for a service.",
- desired_state: false
+ description: "The command used to check the run status for a service.",
+ desired_state: false
# command to call to restart service
property :restart_command, [ String, nil, FalseClass ],
- description: "The command used to restart a service.",
- desired_state: false
+ description: "The command used to restart a service.",
+ desired_state: false
property :reload_command, [ String, nil, FalseClass ],
- description: "The command used to tell a service to reload its configuration.",
- desired_state: false
+ description: "The command used to tell a service to reload its configuration.",
+ desired_state: false
# The path to the init script associated with the service. On many
# distributions this is '/etc/init.d/SERVICE_NAME' by default. In
@@ -78,8 +78,8 @@ class Chef
# specify overrides for the start_command, stop_command and
# restart_command properties.
property :init_command, String,
- description: "The path to the init script that is associated with the service. Use init_command to prevent the need to specify overrides for the start_command, stop_command, and restart_command properties. When this property is not specified, the #{Chef::Dist::CLIENT} will use the default init command for the service provider being used.",
- desired_state: false
+ description: "The path to the init script that is associated with the service. Use init_command to prevent the need to specify overrides for the start_command, stop_command, and restart_command properties. When this property is not specified, the #{Chef::Dist::CLIENT} will use the default init command for the service provider being used.",
+ desired_state: false
# if the service is enabled or not
property :enabled, [ TrueClass, FalseClass ], skip_docs: true
@@ -91,8 +91,8 @@ class Chef
property :masked, [ TrueClass, FalseClass ], skip_docs: true
property :options, [ Array, String ],
- description: "Solaris platform only. Options to pass to the service command. See the svcadm manual for details of possible options.",
- coerce: proc { |x| x.respond_to?(:split) ? x.shellsplit : x }
+ description: "Solaris platform only. Options to pass to the service command. See the svcadm manual for details of possible options.",
+ coerce: proc { |x| x.respond_to?(:split) ? x.shellsplit : x }
# Priority arguments can have two forms:
#
@@ -105,22 +105,22 @@ class Chef
# similar for other runlevels
#
property :priority, [ Integer, String, Hash ],
- description: "Debian platform only. The relative priority of the program for start and shutdown ordering. May be an integer or a Hash. An integer is used to define the start run levels; stop run levels are then 100-integer. A Hash is used to define values for specific run levels. For example, { 2 => [:start, 20], 3 => [:stop, 55] } will set a priority of twenty for run level two and a priority of fifty-five for run level three."
+ description: "Debian platform only. The relative priority of the program for start and shutdown ordering. May be an integer or a Hash. An integer is used to define the start run levels; stop run levels are then 100-integer. A Hash is used to define values for specific run levels. For example, { 2 => [:start, 20], 3 => [:stop, 55] } will set a priority of twenty for run level two and a priority of fifty-five for run level three."
# timeout only applies to the windows service manager
property :timeout, Integer,
- description: "Microsoft Windows platform only. The amount of time (in seconds) to wait before timing out.",
- desired_state: false
+ description: "Microsoft Windows platform only. The amount of time (in seconds) to wait before timing out.",
+ desired_state: false
property :parameters, Hash,
- description: "Upstart only: A hash of parameters to pass to the service command for use in the service definition."
+ description: "Upstart only: A hash of parameters to pass to the service command for use in the service definition."
property :run_levels, Array,
- description: "RHEL platforms only: Specific run_levels the service will run under."
+ description: "RHEL platforms only: Specific run_levels the service will run under."
property :user, String,
- description: "systemd only: A username to run the service under.",
- introduced: "12.21"
+ description: "systemd only: A username to run the service under.",
+ introduced: "12.21"
end
end
end