]> git.openstreetmap.org Git - chef.git/blobdiff - cookbooks/web/templates/default/logrotate.apache.erb
Add a load more cookbooks to the public repository
[chef.git] / cookbooks / web / templates / default / logrotate.apache.erb
diff --git a/cookbooks/web/templates/default/logrotate.apache.erb b/cookbooks/web/templates/default/logrotate.apache.erb
new file mode 100644 (file)
index 0000000..6b8a661
--- /dev/null
@@ -0,0 +1,16 @@
+# DO NOT EDIT - This file is being maintained by Chef
+
+/var/log/apache2/*.log {
+  daily
+  missingok
+  rotate 28
+  compress
+  delaycompress
+  notifempty
+  create 640 root adm
+  sharedscripts
+  postrotate
+    /usr/bin/service apache2 reload > /dev/null
+    /usr/bin/rsync /var/log/apache2/access.log.2.gz horntail::logs/www.openstreetmap.org/<%= node[:hostname] %>-`date -d "-2 days" +%Y-%m-%d`.gz
+  endscript
+}