X-Git-Url: https://git.openstreetmap.org./chef.git/blobdiff_plain/1c848471a16f9d1ee1fc8a327af110447ea1ef4c..3da3f2d77d452db7a79df46a82af096e3b7f37dc:/cookbooks/web/templates/default/rails.cron.erb diff --git a/cookbooks/web/templates/default/rails.cron.erb b/cookbooks/web/templates/default/rails.cron.erb index 7945c3dea..e34880f36 100644 --- a/cookbooks/web/templates/default/rails.cron.erb +++ b/cookbooks/web/templates/default/rails.cron.erb @@ -1,4 +1,7 @@ #!/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 +/usr/local/bin/cleanup-rails-assets <%= @directory %>