]> git.openstreetmap.org Git - chef.git/blobdiff - cookbooks/tilecache/templates/default/logrotate.squid.erb
tilecache: rsync logs to ironbelly on logrotate
[chef.git] / cookbooks / tilecache / templates / default / logrotate.squid.erb
diff --git a/cookbooks/tilecache/templates/default/logrotate.squid.erb b/cookbooks/tilecache/templates/default/logrotate.squid.erb
new file mode 100644 (file)
index 0000000..80953e8
--- /dev/null
@@ -0,0 +1,15 @@
+# DO NOT EDIT - This file is being maintained by Chef
+
+/var/log/squid/*.log {
+  daily
+  compress
+  delaycompress
+  rotate 2
+  missingok
+  nocreate
+  sharedscripts
+  postrotate
+    test ! -e /var/run/squid.pid || /usr/sbin/squid -k rotate
+    /usr/bin/rsync /var/log/squid/zere.log.2.gz ironbelly::logs/tile.openstreetmap.org/<%= node[:hostname] %>-`date -d "-2 days" +%Y-%m-%d`.gz
+  endscript
+}