Skip to content

Commit

Permalink
adding provisions for canvas temp
Browse files Browse the repository at this point in the history
  • Loading branch information
neallawson committed Dec 4, 2013
1 parent 9e97351 commit 509d0b7
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions script/canvas_init
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,15 @@ set -e
if [ "$(id -u)" == "0" ]; then
if [ -f /etc/profile.d/rbenv.sh ]; then
echo "Using rbenv"
exec su $(stat -c %U $(dirname $(readlink -f $0))/../config/environment.rb) -c "/bin/bash -c 'source /etc/profile.d/rbenv.sh && $0 $@'"
exit -1;

if [ -f /etc/profile.d/canvas-enviroment.sh ]; then
echo "Using /etc/profile.d/canvas-enviroment.sh"
exec su $(stat -c %U $(dirname $(readlink -f $0))/../config/environment.rb) -c "/bin/bash -c 'source /etc/profile.d/canvas-enviroment.sh && source /etc/profile.d/rbenv.sh && $0 $@'"
exit -1;
else
exec su $(stat -c %U $(dirname $(readlink -f $0))/../config/environment.rb) -c "/bin/bash -c 'source /etc/profile.d/rbenv.sh && $0 $@'"
exit -1;
fi
else
exec su $(stat -c %U $(dirname $(readlink -f $0))/../config/environment.rb) -c "/bin/bash $0 $@"
exit -1;
Expand Down

0 comments on commit 509d0b7

Please sign in to comment.