projects
/
chef.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Add gpx_files and gpx_file_tags to monthly reindex
[chef.git]
/
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 b28eed753ad5b2b261129585a915a39b32f2843f..4fe3bf99a324772430690f7bfcbae3defb47bf68 100644
(file)
--- 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
#!/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 ]
# Cleanup assets
if [ -x /usr/local/bin/cleanup-rails-assets ]