summaryrefslogtreecommitdiff
path: root/lib/support
diff options
context:
space:
mode:
authorRémy Coutable <remy@rymai.me>2016-02-08 17:30:10 +0000
committerRémy Coutable <remy@rymai.me>2016-02-08 17:30:10 +0000
commit555b1a621a9a73e8cdead9888375a43a8e59f639 (patch)
treeec122c2aedb01e20589509e395f9e764b988ba57 /lib/support
parent4667c169e7d7e3ad2f5cf6803e5747c088bbed17 (diff)
parent1fab3979b1f1a0172a06a22c1a238ce400c2dfe5 (diff)
downloadgitlab-ce-555b1a621a9a73e8cdead9888375a43a8e59f639.tar.gz
Merge branch 'fix-init' into 'master'
Fixed init.d script not working on OS X -s flag of su doesn't work correctly on OS X, logging in as the user and not running the requested command. By moving the bash shell init inside the su command we avoid the issue Fixes Issue #3309 See merge request !1728
Diffstat (limited to 'lib/support')
-rwxr-xr-xlib/support/init.d/gitlab2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/support/init.d/gitlab b/lib/support/init.d/gitlab
index 1981297ecd3..d95e7023d2e 100755
--- a/lib/support/init.d/gitlab
+++ b/lib/support/init.d/gitlab
@@ -49,7 +49,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 [ `whoami` != "$app_user" ]; then
- eval su - "$app_user" -s $shell_path -c $(echo \")$0 "$@"$(echo \"); exit;
+ eval su - "$app_user" -c $(echo \")$shell_path -l -c \'$0 "$@"\'$(echo \"); exit;
fi
# Switch to the gitlab path, exit on failure.