From: Sarah Hoffmann Date: Sun, 20 Mar 2016 14:54:52 +0000 (+0100) Subject: nominatim: reduce size of log archives X-Git-Url: https://git.openstreetmap.org/chef.git/commitdiff_plain/caf29106dbab75738cb0f437b11e0297cff3360d nominatim: reduce size of log archives --- diff --git a/cookbooks/nominatim/recipes/base.rb b/cookbooks/nominatim/recipes/base.rb index 8721ef014..a7c5a9c52 100644 --- a/cookbooks/nominatim/recipes/base.rb +++ b/cookbooks/nominatim/recipes/base.rb @@ -84,6 +84,13 @@ template "/etc/logrotate.d/nominatim" do mode 0644 end +template "/etc/logrotate.d/apache2" do + source "logrotate.apache.erb" + owner "root" + group "root" + mode 0644 +end + package "osmosis" package "gcc" package "proj-bin" diff --git a/cookbooks/nominatim/templates/default/logrotate.apache.erb b/cookbooks/nominatim/templates/default/logrotate.apache.erb new file mode 100644 index 000000000..170ddb189 --- /dev/null +++ b/cookbooks/nominatim/templates/default/logrotate.apache.erb @@ -0,0 +1,15 @@ +# DO NOT EDIT - This file is being maintained by Chef + +/var/log/apache2/*.log { + weekly + missingok + rotate 8 + compress + delaycompress + notifempty + create 640 root adm + sharedscripts + postrotate + /usr/bin/service apache2 reload > /dev/null 2>&1 + endscript +} diff --git a/cookbooks/nominatim/templates/default/logrotate.nominatim.erb b/cookbooks/nominatim/templates/default/logrotate.nominatim.erb index a14042e47..0b853f79f 100644 --- a/cookbooks/nominatim/templates/default/logrotate.nominatim.erb +++ b/cookbooks/nominatim/templates/default/logrotate.nominatim.erb @@ -3,7 +3,7 @@ /var/log/nominatim/update.log { weekly missingok - rotate 12 + rotate 5 compress delaycompress notifempty @@ -13,7 +13,7 @@ /var/log/nominatim/query.log { weekly missingok - rotate 52 + rotate 8 compress delaycompress notifempty