From: Tom Hughes Date: Wed, 24 Aug 2016 18:33:09 +0000 (+0100) Subject: Only run asset cleanup script if it exists X-Git-Url: https://git.openstreetmap.org./chef.git/commitdiff_plain/f4b962486aa3a7a8afd89ca9596cda30446ce74f Only run asset cleanup script if it exists --- diff --git a/cookbooks/web/templates/default/rails.cron.erb b/cookbooks/web/templates/default/rails.cron.erb index e34880f36..b28eed753 100644 --- a/cookbooks/web/templates/default/rails.cron.erb +++ b/cookbooks/web/templates/default/rails.cron.erb @@ -4,4 +4,7 @@ find <%= @directory %>/tmp \( \( -type f -mtime +28 \) -o \( -type d -empty \) \) -delete # Cleanup assets -/usr/local/bin/cleanup-rails-assets <%= @directory %> +if [ -x /usr/local/bin/cleanup-rails-assets ] +then + /usr/local/bin/cleanup-rails-assets <%= @directory %> +fi