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 8721ef0..a7c5a9c 100644 (file)
@@ -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 (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 a14042e..0b853f7 100644 (file)
@@ -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