-i flag allows sudo to work for git users using rvm that is not being used by

root user (su might be better)
This commit is contained in:
Jeff '2 bits' Bachtel 2013-09-06 18:53:10 -04:00 committed by Jeff Bachtel
parent 201158f1de
commit ca1d63c2f6
1 changed files with 1 additions and 1 deletions

View File

@ -35,7 +35,7 @@ sidekiq_pid_path="$pid_path/sidekiq.pid"
# Switch to the app_user if it is not he/she who is running the script.
if [ "$USER" != "$app_user" ]; then
sudo -u "$app_user" -H $0 "$@"; exit;
sudo -u "$app_user" -H -i $0 "$@"; exit;
fi
# Switch to the gitlab path, if it fails exit with an error.