File tree Expand file tree Collapse file tree
chef/lib/chef/provider/service
example-repository/cookbooks/CHEF-56/recipes Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -26,7 +26,7 @@ class Init < Chef::Provider::Service
2626
2727 def initialize ( node , new_resource )
2828 super ( node , new_resource )
29- @init_command || = "/etc/init.d/#{ @new_resource . service_name } "
29+ @init_command = "/etc/init.d/#{ @new_resource . service_name } "
3030 end
3131
3232 def load_current_resource
Original file line number Diff line number Diff line change @@ -27,7 +27,7 @@ class Redhat < Chef::Provider::Service::Init
2727
2828 def initialize ( node , new_resource )
2929 super ( node , new_resource )
30- @init_command || = "/sbin/service #{ @new_resource . service_name } "
30+ @init_command = "/sbin/service #{ @new_resource . service_name } "
3131 end
3232
3333 def load_current_resource
Original file line number Diff line number Diff line change 1+ #
2+ # Cookbook Name:: CHEF-56
3+ # Recipe:: default
4+ #
5+ # Copyright 2009, Example Com
6+ #
7+ # Licensed under the Apache License, Version 2.0 (the "License");
8+ # you may not use this file except in compliance with the License.
9+ # You may obtain a copy of the License at
10+ #
11+ # http://www.apache.org/licenses/LICENSE-2.0
12+ #
13+ # Unless required by applicable law or agreed to in writing, software
14+ # distributed under the License is distributed on an "AS IS" BASIS,
15+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16+ # See the License for the specific language governing permissions and
17+ # limitations under the License.
18+ #
19+
20+ service "vncserver" do
21+ supports :status => true , :reload => true
22+ action :enable
23+ end
24+
25+ service "vncserver" do
26+ action :start
27+ end
28+
29+ service "vncserver" do
30+ action :restart
31+ end
32+
33+ service "vncserver" do
34+ action :stop
35+ end
36+
37+ service "vncserver" do
38+ action :disable
39+ end
You can’t perform that action at this time.
0 commit comments