Skip to content

Commit

Permalink
[COOK-1761] Notify logrotate service to reload when configurations ar…
Browse files Browse the repository at this point in the history
…e changed
  • Loading branch information
sethvargo committed Oct 4, 2013
1 parent f56b1c7 commit 61a9ea6
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 0 deletions.
1 change: 1 addition & 0 deletions definitions/logrotate_app.rb
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@
:lastaction => params[:lastaction],
:options => options
)
notifies :reload, 'service[logrotate]', :delayed
end
else
file "/etc/logrotate.d/#{params[:name]}" do
Expand Down
6 changes: 6 additions & 0 deletions recipes/default.rb
Original file line number Diff line number Diff line change
Expand Up @@ -18,3 +18,9 @@
#

package "logrotate"

# This service definition is required so templates and other resources
# can restart/reload the service when updated.
service 'logrotate' do
action :nothing
end
1 change: 1 addition & 0 deletions recipes/global.rb
Original file line number Diff line number Diff line change
Expand Up @@ -25,4 +25,5 @@
source 'logrotate-global.erb'
mode 00644
variables({ :configuration => parsed_configuration })
notifies :reload, 'service[logrotate]', :delayed
end

0 comments on commit 61a9ea6

Please sign in to comment.