Skip to content
This repository has been archived by the owner on Jun 26, 2024. It is now read-only.

Commit

Permalink
Merge pull request sous-chefs#15 from rtkwlf/upstart-restart
Browse files Browse the repository at this point in the history
Stop/start rather than restart upstart services on job config file update

https://trello.com/c/1xanHMG9
  • Loading branch information
rtkrruvinskiy committed Apr 22, 2013
2 parents 562094f + 3f2040c commit dc7b6bc
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 5 deletions.
5 changes: 3 additions & 2 deletions chef/cookbooks/awn/recipes/yaf_transformer.rb
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,14 @@
:deployment_id => node['awn']['rtkbox_deployment_id'],
:log_file => node['yaf_transformer']['log_file']
)
notifies :restart, "service[yaf_transformer]", :delayed
notifies :stop, "service[yaf_transformer]", :delayed
notifies :start, "service[yaf_transformer]", :delayed
end

# Start the service
service "yaf_transformer" do
provider Chef::Provider::Service::Upstart
supports :status => true, :restart => true, :reload => true
supports :start => true, :stop => true, :status => true, :restart => true, :reload => true
action [ :enable, :start ]
end

2 changes: 1 addition & 1 deletion chef/cookbooks/p0f/recipes/default.rb
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,6 @@
# Start the service
service "p0f" do
provider Chef::Provider::Service::Upstart
supports :status => true, :restart => true, :reload => true
supports :start => true, :stop => true, :status => true, :restart => true, :reload => true
action [ :enable ]
end
5 changes: 3 additions & 2 deletions chef/cookbooks/yaf/recipes/default.rb
Original file line number Diff line number Diff line change
Expand Up @@ -47,13 +47,14 @@
:log_file => node['yaf']['log_file'],
:log_level => node['yaf']['log_level']
)
notifies :restart, "service[yaf]", :delayed
notifies :stop, "service[yaf]", :delayed
notifies :start, "service[yaf]", :delayed
end

# Start the service
service "yaf" do
provider Chef::Provider::Service::Upstart
supports :status => true, :restart => true, :reload => true
supports :start => true, :stop => true, :status => true, :restart => true, :reload => true
action [ :enable, :start ]
end

0 comments on commit dc7b6bc

Please sign in to comment.