X-Git-Url: https://git.openstreetmap.org./chef.git/blobdiff_plain/f4b962486aa3a7a8afd89ca9596cda30446ce74f..14e316cd3e1ab5f25a54d0765ebad61ac665ccb4:/cookbooks/web/templates/default/rails.cron.erb?ds=sidebyside diff --git a/cookbooks/web/templates/default/rails.cron.erb b/cookbooks/web/templates/default/rails.cron.erb index b28eed753..4fe3bf99a 100644 --- a/cookbooks/web/templates/default/rails.cron.erb +++ b/cookbooks/web/templates/default/rails.cron.erb @@ -1,7 +1,10 @@ #!/bin/sh # Cleanup temporary directory -find <%= @directory %>/tmp \( \( -type f -mtime +28 \) -o \( -type d -empty \) \) -delete +if [ -d <%= @directory %>/tmp ] +then + find <%= @directory %>/tmp \( \( -type f -mtime +28 \) -o \( -type d -empty \) \) -delete +fi # Cleanup assets if [ -x /usr/local/bin/cleanup-rails-assets ]