]> git.openstreetmap.org Git - chef.git/blobdiff - cookbooks/nominatim/templates/default/logrotate.nginx.erb
nominatim: move to nginx for webserving
[chef.git] / cookbooks / nominatim / templates / default / logrotate.nginx.erb
diff --git a/cookbooks/nominatim/templates/default/logrotate.nginx.erb b/cookbooks/nominatim/templates/default/logrotate.nginx.erb
new file mode 100644 (file)
index 0000000..5bbd02e
--- /dev/null
@@ -0,0 +1,29 @@
+# DO NOT EDIT - This file is being maintained by Chef
+
+/var/log/nginx/*.log {
+  daily
+  missingok
+  rotate 7
+  compress
+  delaycompress
+  notifempty
+  create 640 nginx adm
+  sharedscripts
+  postrotate
+    [ -f /var/run/nginx.pid ] && kill -USR1 `cat /var/run/nginx.pid`
+  endscript
+}
+
+<%= node[:nominatim][:logdir] %>/nominatim.openstreetmap.org-access.log {
+  daily
+  missingok
+  rotate 28
+  compress
+  delaycompress
+  notifempty
+  create 640 root adm
+  sharedscripts
+  postrotate
+    [ -f /var/run/nginx.pid ] && kill -USR1 `cat /var/run/nginx.pid`
+  endscript
+}