diff options
author | Nilton Moura <moura.nilton@gmail.com> | 2013-12-26 17:13:25 -0200 |
---|---|---|
committer | Nilton Moura <moura.nilton@gmail.com> | 2013-12-26 17:13:25 -0200 |
commit | 6daa97f47212d89bfa0dcbb7f549ecb68d1b3783 (patch) | |
tree | 4ccb58246fb5e1d13ad26d6d0445382a9c68dae7 /lib/support/init.d | |
parent | b27bd2b10d08e16663d6554d11e0eeef708a87d5 (diff) | |
download | gitlab-ce-6daa97f47212d89bfa0dcbb7f549ecb68d1b3783.tar.gz |
Changed sudo by su -c
The sudo command needs a tty to run. If you put this file on a CentOS 6, for example, it will not run in the host startup process. Instead, the 'su -c' runs the command apart if it has or not a tty.
I tested this change in a fresh install of gitlab on a CentOS 6.5 with successful.
Diffstat (limited to 'lib/support/init.d')
-rwxr-xr-x | lib/support/init.d/gitlab | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/support/init.d/gitlab b/lib/support/init.d/gitlab index f1b94087b6a..42bd4785d56 100755 --- a/lib/support/init.d/gitlab +++ b/lib/support/init.d/gitlab @@ -41,7 +41,7 @@ test -f /etc/default/gitlab && . /etc/default/gitlab # 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 -i $0 "$@"; exit; + eval su - "$app_user" -c $(echo \")$0 "$@"$(echo \"); exit; fi # Switch to the gitlab path, exit on failure. |