]> git.openstreetmap.org Git - chef.git/commitdiff
nominatim: reduce size of log archives
authorSarah Hoffmann <lonvia@denofr.de>
Sun, 20 Mar 2016 14:54:52 +0000 (15:54 +0100)
committerSarah Hoffmann <lonvia@denofr.de>
Sun, 20 Mar 2016 14:54:52 +0000 (15:54 +0100)
cookbooks/nominatim/recipes/base.rb
cookbooks/nominatim/templates/default/logrotate.apache.erb [new file with mode: 0644]
cookbooks/nominatim/templates/default/logrotate.nominatim.erb

index 8721ef0146e987bf4018cad29cd7b2d10575551f..a7c5a9c52a0adee354b7957ff6a581cb835a8be3 100644 (file)
@@ -84,6 +84,13 @@ template "/etc/logrotate.d/nominatim" do
   mode 0644
 end
 
   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"
 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 (file)
index 0000000..170ddb1
--- /dev/null
@@ -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
+}
index a14042e4766f78b9b6ccfe00535edc5fdd9cd68e..0b853f79f785cd449b2c32a32a49cbc2b07430d6 100644 (file)
@@ -3,7 +3,7 @@
 /var/log/nominatim/update.log {
   weekly
   missingok
 /var/log/nominatim/update.log {
   weekly
   missingok
-  rotate 12
+  rotate 5
   compress
   delaycompress
   notifempty
   compress
   delaycompress
   notifempty
@@ -13,7 +13,7 @@
 /var/log/nominatim/query.log {
   weekly
   missingok
 /var/log/nominatim/query.log {
   weekly
   missingok
-  rotate 52
+  rotate 8
   compress
   delaycompress
   notifempty
   compress
   delaycompress
   notifempty