diff options
author | Marin Jankovski <maxlazio@gmail.com> | 2015-06-02 17:19:31 +0300 |
---|---|---|
committer | Marin Jankovski <maxlazio@gmail.com> | 2015-06-02 17:19:31 +0300 |
commit | c4cb563e986e9082228e7732f0f6554997f6fa33 (patch) | |
tree | c9f8cbd1081f5b9f16647511ab80f3b072b0fda4 /lib/support | |
parent | 1c328fa4d7c8c2c1e8717a6f35c5ae21272846e8 (diff) | |
parent | ef351f4cf4c2648ba6e5a71dc6d5086b4e45358d (diff) |
Merge pull request #8730 from drunkard/master
Specify shell while run me as git user
Diffstat (limited to 'lib/support')
-rwxr-xr-x | lib/support/init.d/gitlab | 3 | ||||
-rwxr-xr-x | lib/support/init.d/gitlab.default.example | 5 |
2 files changed, 7 insertions, 1 deletions
diff --git a/lib/support/init.d/gitlab b/lib/support/init.d/gitlab index b066a1a6935..946902e2f6d 100755 --- a/lib/support/init.d/gitlab +++ b/lib/support/init.d/gitlab @@ -35,13 +35,14 @@ pid_path="$app_root/tmp/pids" socket_path="$app_root/tmp/sockets" web_server_pid_path="$pid_path/unicorn.pid" sidekiq_pid_path="$pid_path/sidekiq.pid" +shell_path="/bin/bash" # Read configuration variable file if it is present 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 - eval su - "$app_user" -c $(echo \")$0 "$@"$(echo \"); exit; + eval su - "$app_user" -s $shell_path -c $(echo \")$0 "$@"$(echo \"); exit; fi # Switch to the gitlab path, exit on failure. diff --git a/lib/support/init.d/gitlab.default.example b/lib/support/init.d/gitlab.default.example index 9951bacedf5..cf7f4198cbf 100755 --- a/lib/support/init.d/gitlab.default.example +++ b/lib/support/init.d/gitlab.default.example @@ -29,3 +29,8 @@ web_server_pid_path="$pid_path/unicorn.pid" # sidekiq_pid_path defines the path in which to create the pid file for sidekiq # The default is "$pid_path/sidekiq.pid" sidekiq_pid_path="$pid_path/sidekiq.pid" + +# shell_path defines the path of shell for "$app_user" in case you are using +# shell other than "bash" +# The default is "/bin/bash" +shell_path="/bin/bash" |