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.rb7
1 files changed, 3 insertions, 4 deletions
diff --git a/lib/chef/resource/service.rb b/lib/chef/resource/service.rb
index 36df7c859a..aa59b543be 100644
--- a/lib/chef/resource/service.rb
+++ b/lib/chef/resource/service.rb
@@ -22,14 +22,15 @@ require 'chef/resource'
class Chef
class Resource
class Service < Chef::Resource
-
identity_attr :service_name
state_attrs :enabled, :running
+ default_action :nothing
+ allowed_actions :enable, :disable, :start, :stop, :restart, :reload
+
def initialize(name, run_context=nil)
super
- @resource_name = :service
@service_name = name
@enabled = nil
@running = nil
@@ -43,9 +44,7 @@ class Chef
@init_command = nil
@priority = nil
@timeout = nil
- @action = "nothing"
@supports = { :restart => false, :reload => false, :status => false }
- @allowed_actions.push(:enable, :disable, :start, :stop, :restart, :reload)
end
def service_name(arg=nil)