Some review fixes.
[arvados.git] / jenkins / rails-package-scripts / postinst.sh
index dfc58c5cdf8e8cb09d8ffa290f92b02713655b4e..5ff2a9b2c9d33941cdcdc89c8030f3103d60a7b3 100644 (file)
@@ -194,7 +194,7 @@ configure_version() {
   fi
 
   run_and_report "Running bundle install" \
-      $COMMAND_PREFIX bundle install --path $SHARED_PATH/vendor_bundle --quiet
+      $COMMAND_PREFIX bundle install --path $SHARED_PATH/vendor_bundle --local --quiet
 
   echo -n "Ensuring directory and file permissions ..."
   # Ensure correct ownership of a few files
@@ -220,23 +220,6 @@ configure_version() {
           $COMMAND_PREFIX bundle exec rake config:check || APPLICATION_READY=0
   fi
 
-  # initialize git_internal_dir
-  # usually /var/lib/arvados/internal.git (set in application.default.yml )
-  if [ "$APPLICATION_READY" = "1" ]; then
-      GIT_INTERNAL_DIR=$($COMMAND_PREFIX bundle exec rake config:check 2>&1 | grep git_internal_dir | awk '{ print $2 }')
-      if [ -e "$GIT_INTERNAL_DIR" ]
-      then
-         run_and_report "Creating and initializing git_internal_dir '$GIT_INTERNAL_DIR'" \
-                        mkdir -p "$GIT_INTERNAL_DIR" && \
-                        chown "$WWW_OWNER:" "$GIT_INTERNAL_DIR" && \
-                        su -c "git init --bare $GIT_INTERNAL_DIR" "$WWW_OWNER:"
-      fi
-      run_and_report "Making sure '$GIT_INTERNAL_DIR' has the right permission" \
-                    chown -R "$WWW_OWNER:" "$GIT_INTERNAL_DIR"
-  else
-      echo "Initializing git_internal_dir... skipped."
-  fi
-
   # precompile assets; thankfully this does not take long
   if [ "$APPLICATION_READY" = "1" ]; then
       run_and_report "Precompiling assets" \
@@ -247,6 +230,8 @@ configure_version() {
   fi
   chown -R "$WWW_OWNER:" $RELEASE_PATH/tmp
 
+  setup_before_nginx_restart
+
   if [ ! -z "$WEB_SERVICE" ]; then
       service "$WEB_SERVICE" restart
   fi