]> git.openstreetmap.org Git - chef.git/commitdiff
Add log rotation for renderd logs
authorTom Hughes <tom@compton.nu>
Wed, 30 Apr 2014 21:41:26 +0000 (22:41 +0100)
committerTom Hughes <tom@compton.nu>
Wed, 30 Apr 2014 21:49:54 +0000 (22:49 +0100)
cookbooks/tile/recipes/default.rb
cookbooks/tile/templates/default/renderd.logrotate.erb [new file with mode: 0644]

index 9b4b3108390b5251a034cc1ffe4fec23219f8dc2..6cb1b9acbd21620ee2f96a0f6092094856aceb96 100644 (file)
@@ -496,6 +496,13 @@ template "/etc/rsyslog.d/20-renderd.conf" do
   notifies :restart, "service[rsyslog]"
 end
 
+template "/etc/logrotate.d/renderd" do
+  source "renderd.logrotate.erb"
+  owner "root"
+  group "root"
+  mode 0644
+end
+
 package "liblockfile-simple-perl"
 package "libfilesys-df-perl"
 
diff --git a/cookbooks/tile/templates/default/renderd.logrotate.erb b/cookbooks/tile/templates/default/renderd.logrotate.erb
new file mode 100644 (file)
index 0000000..95099a7
--- /dev/null
@@ -0,0 +1,10 @@
+# DO NOT EDIT - This file is being maintained by Chef
+
+/var/log/tile/renderd.log {
+  compress
+  delaycompress
+  notifempty
+  postrotate
+    reload rsyslog >/dev/null 2>&1 || true
+  endscript
+}