]> git.openstreetmap.org Git - chef.git/blobdiff - cookbooks/web/templates/default/rails.cron.erb
Fix cgimap log rotation
[chef.git] / cookbooks / web / templates / default / rails.cron.erb
index 7945c3dea22b22d6c5adc7a6d34690e8272dcb93..b28eed753ad5b2b261129585a915a39b32f2843f 100644 (file)
@@ -1,4 +1,10 @@
 #!/bin/sh
 
 # Cleanup temporary directory
-find <%= @directory %>/tmp -mtime +28 -print0 | xargs -0r rm
+find <%= @directory %>/tmp \( \( -type f -mtime +28 \) -o \( -type d -empty \) \) -delete
+
+# Cleanup assets
+if [ -x /usr/local/bin/cleanup-rails-assets ]
+then
+    /usr/local/bin/cleanup-rails-assets <%= @directory %>
+fi