arvados-api-server-upgrade.sh fix: do not try to chmod the cache
authorWard Vandewege <ward@curoverse.com>
Wed, 4 Nov 2015 14:50:42 +0000 (09:50 -0500)
committerWard Vandewege <ward@curoverse.com>
Wed, 4 Nov 2015 14:50:42 +0000 (09:50 -0500)
directory if it doesn't exist. This avoids an error on fresh install.
Rails will create the cache directory if it doesn't exist.

No issue #

jenkins/arvados-api-server-extras/arvados-api-server-upgrade.sh

index edecb211b79dcac25cda058f81fecba0bc30cc18..2fff1e7cf9e4f507436c6717a6b3e83ececa7820 100755 (executable)
@@ -81,7 +81,10 @@ chown -R "$WWW_OWNER" $RELEASE_PATH/tmp
 chown -R "$WWW_OWNER" $SHARED_PATH/log
 chown "$WWW_OWNER" $RELEASE_PATH/db/structure.sql
 chmod 644 $SHARED_PATH/log/*
-chmod -R 2775 $RELEASE_PATH/tmp/cache/
+# Rails creates the cache directory if it doesn't exist
+if [[ -d $RELEASE_PATH/tmp/cache/ ]]; then
+  chmod -R 2775 $RELEASE_PATH/tmp/cache/
+fi
 echo "Done."
 
 echo "Running sanity check"