Skip to content

Commit 9eabc93

Browse files
committed
Implement #58 #96 #99
1 parent 21bfab7 commit 9eabc93

File tree

1 file changed

+12
-3
lines changed

1 file changed

+12
-3
lines changed

init/sysvinit/centos/gitlab-centos

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
#!/bin/bash
22
#
33
# GitLab
4-
# Maintainer: @elvanja, @troyanov, @eiyaya, @foyo23, @nielsbasjes
5-
# App Version: 5.1.0
4+
# Contributors : @elvanja, @troyanov, @eiyaya, @foyo23, @nielsbasjes, @relip, @JasonMing, @andronat
5+
# App Version : 5.x
66

77
# chkconfig: 2345 82 55
88
# processname: puma
@@ -13,9 +13,17 @@
1313
# https://github.com/gitlabhq/gitlabhq/issues/1049#issuecomment-8386882
1414
# https://gist.github.com/3062860
1515

16+
# Save original $PATH
17+
# /etc/rc.d/init.d/functions resets $PATH to default(/sbin:/usr/sbin:/bin:/usr/bin).
18+
# Consequently, rvm and compiled ruby with custom path (which isn't /usr/bin) cannot be executed.
19+
ORIGINAL_PATH=$PATH
20+
1621
# Include RedHat function library
1722
. /etc/rc.d/init.d/functions
1823

24+
# Restore original $PATH
25+
PATH=$ORIGINAL_PATH
26+
1927
# The name of the service
2028
NAME=git
2129

@@ -33,7 +41,8 @@ SLOCK=/var/lock/subsys/sidekiq
3341
OPTS="-C $APP_PATH/config/puma.rb -e production"
3442

3543
# Ruby related path update
36-
RUBY_PATH_PATCH="PATH=$PATH:/usr/local/bin:/usr/local/lib:/home/git/bin && export PATH && "
44+
RVM_PATH="/usr/local/rvm/bin"
45+
RUBY_PATH_PATCH="PATH=/usr/local/bin:/usr/local/lib:/home/git/bin:$RVM_PATH:$PATH && export PATH && "
3746

3847
start() {
3948
cd $APP_PATH

0 commit comments

Comments
 (0)