Only run asset cleanup script if it exists
authorTom Hughes <tom@compton.nu>
Wed, 24 Aug 2016 18:33:09 +0000 (19:33 +0100)
committerTom Hughes <tom@compton.nu>
Wed, 24 Aug 2016 18:33:09 +0000 (19:33 +0100)
cookbooks/web/templates/default/rails.cron.erb

index e34880f..b28eed7 100644 (file)
@@ -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