gitlabhq/gitlabhq — pull request #5012 by jeffb-bt (2013-09-06 22:57:19+00:00)
Title: -i flag allows sudo to work for git users using rvm that is not being us...

If the gitlab user (git in the default case) is using a rvm version of Ruby that is not shared by the root user, then execution of /etc/init.d/gitlab can fail because the sudo shell spawned by the init script will not source the appropriate shell resources. Adding the -i flag fixes that for me.

Use of 'su' might be preferable, on default CentOS at least this script fails to start the gitlab service on boot due to the non-presence of a tty and sudo's requirement for such by default.