How to run a template that creates a init.d script before the service is created in Chef

How to run a template that creates a init.d script before the service is created in Chef

service "nginx" do
supports :restart => true, :start => true, :stop => true, :reload => true
action :nothing
end

template "nginx" do
path "/etc/init.d/nginx"
source "nginx.erb"
owner "root"
group "root"
mode "0755"
notifies :enable, "service[nginx]"
notifies :start, "service[nginx]"
end

Comments are closed.