From 903bcdd37173bca43a300755912e5f1359460768 Mon Sep 17 00:00:00 2001 From: JT Olds Date: Thu, 3 Feb 2011 12:52:04 -0700 Subject: [PATCH] move gem_home configuration for delayed_jobs to config folder right now, the documentation tells people to change script/canvas_init, which kinda sucks for people hoping to upgrade by doing git pull. this seems sort of hacky - i'm open to suggestions. Change-Id: I66bf3deb2f51c22c23c1963369c6ab3e5f391d33 Reviewed-on: https://gerrit.instructure.com/2145 Reviewed-by: Brian Palmer Tested-by: Hudson --- .gitignore | 1 + script/canvas_init | 5 +++++ 2 files changed, 6 insertions(+) diff --git a/.gitignore b/.gitignore index 01e561097ec..93524a2870b 100644 --- a/.gitignore +++ b/.gitignore @@ -21,6 +21,7 @@ config/domain.yml config/etherpad.yml config/facebooker.yml config/file_store.yml +config/GEM_HOME config/google_docs.yml config/kaltura.yml config/linked_in.yml diff --git a/script/canvas_init b/script/canvas_init index 19d7c388d7a..71e12c71413 100755 --- a/script/canvas_init +++ b/script/canvas_init @@ -9,6 +9,8 @@ # Short-Description: Start/stop Canvas background jobs ### END INIT INFO +set -e + # drop privs if necessary if [ "$(id -u)" == "0" ]; then exec su $(stat -c %U $(dirname $(readlink -f $0))/../config/environment.rb) -- $0 $@ @@ -19,6 +21,9 @@ fi cd $(dirname $(readlink -f $0))/.. # set up config +if [ -e "config/GEM_HOME" ]; then + export GEM_HOME=$(cat config/GEM_HOME) +fi #export GEM_HOME=/path/to/gem/home export RAILS_ENV=production