Skip to content

Commit ac4f096

Browse files
committed
Merge branch 'script_to_bin' into 'master'
Move from script to bin Reminder to merge when 7.0 gets released.
2 parents da1cbd1 + a7d03c1 commit ac4f096

File tree

3 files changed

+16
-13
lines changed

3 files changed

+16
-13
lines changed

init/sysvinit/centos/gitlab-only-sidekiq

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
#
33
# GitLab
44
# Contributors : @elvanja, @troyanov, @eiyaya, @foyo23, @nielsbasjes, @relip, @JasonMing, @andronat, @axilleas
5-
# App Version : 6.x
5+
# App Version : 6.x - 7.x
66

77
# chkconfig: 2345 82 55
88
# processname: sidekiq
@@ -37,7 +37,7 @@ start() {
3737

3838
# Start sidekiq
3939
echo -n $"Starting sidekiq: "
40-
daemon --pidfile=$SPID --user=$USER "$PATH_PATCH RAILS_ENV=$RAILS_ENV script/background_jobs start"
40+
daemon --pidfile=$SPID --user=$USER "$PATH_PATCH RAILS_ENV=$RAILS_ENV bin/background_jobs start"
4141
sidekiq=$?
4242
[ $sidekiq -eq 0 ] && touch $SLOCK
4343
echo

init/sysvinit/centos/gitlab-puma

100644100755
Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
#
33
# GitLab
44
# Contributors : @elvanja, @troyanov, @eiyaya, @foyo23, @nielsbasjes, @relip, @JasonMing, @andronat
5-
# App Version : 6.x
5+
# App Version : 6.x -7.x
66

77
# chkconfig: 2345 82 55
88
# processname: puma
@@ -24,6 +24,9 @@ ORIGINAL_PATH=$PATH
2424
# Restore original $PATH
2525
PATH=$ORIGINAL_PATH
2626

27+
### Environment variables
28+
RAILS_ENV="production"
29+
2730
# The name of the service
2831
NAME=git
2932

@@ -32,8 +35,8 @@ USER=git
3235
APP_PATH=/home/$USER/gitlab
3336

3437
# The PID and LOCK files used by puma and sidekiq
35-
UPID=$APP_PATH/tmp/pids/puma.pid
36-
ULOCK=/var/lock/subsys/puma
38+
PPID=$APP_PATH/tmp/pids/puma.pid
39+
PLOCK=/var/lock/subsys/puma
3740
SPID=$APP_PATH/tmp/pids/sidekiq.pid
3841
SLOCK=/var/lock/subsys/sidekiq
3942

@@ -51,12 +54,12 @@ start() {
5154
echo -n $"Starting puma: "
5255
daemon --pidfile=$UPID --user=$USER "$RUBY_PATH_PATCH bundle exec puma $OPTS"
5356
puma=$?
54-
[ $puma -eq 0 ] && touch $ULOCK
57+
[ $puma -eq 0 ] && touch $PLOCK
5558
echo
5659

5760
# Start sidekiq
5861
echo -n $"Starting sidekiq: "
59-
daemon --pidfile=$SPID --user=$USER "$RUBY_PATH_PATCH RAILS_ENV=production bundle exec rake sidekiq:start"
62+
daemon --pidfile=$SPID --user=$USER "$RUBY_PATH_PATCH RAILS_ENV=$RAILS_ENV bin/background_jobs start"
6063
sidekiq=$?
6164
[ $sidekiq -eq 0 ] && touch $SLOCK
6265
echo
@@ -72,7 +75,7 @@ stop() {
7275
echo -n $"Stopping puma: "
7376
killproc -p $UPID
7477
puma=$?
75-
[ $puma -eq 0 ] && rm -f $ULOCK
78+
[ $puma -eq 0 ] && rm -f $PLOCK
7679
echo
7780

7881
# Stop sidekiq
@@ -92,7 +95,7 @@ restart() {
9295
}
9396

9497
get_status() {
95-
status -p $UPID puma
98+
status -p $PPID puma
9699
status -p $SPID sidekiq
97100
}
98101

init/sysvinit/centos/gitlab-unicorn

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
#
33
# GitLab
44
# Contributors : @elvanja, @troyanov, @eiyaya, @foyo23, @nielsbasjes, @relip, @JasonMing, @andronat, @axilleas, @mdirkse
5-
# App Version : 6.x
5+
# App Version : 6.x - 7.x
66

77
# chkconfig: 2345 82 55
88
# processname: unicorn
@@ -40,14 +40,14 @@ start() {
4040

4141
# Start unicorn
4242
echo -n $"Starting unicorn: "
43-
daemon --pidfile=$UPID --user=$USER "$PATH_PATCH RAILS_ENV=$RAILS_ENV script/web start"
43+
daemon --pidfile=$UPID --user=$USER "$PATH_PATCH RAILS_ENV=$RAILS_ENV bin/web start"
4444
unicorn=$?
4545
[ $unicorn -eq 0 ] && touch $ULOCK
4646
echo
4747

4848
# Start sidekiq
4949
echo -n $"Starting sidekiq: "
50-
daemon --pidfile=$SPID --user=$USER "$PATH_PATCH RAILS_ENV=$RAILS_ENV script/background_jobs start"
50+
daemon --pidfile=$SPID --user=$USER "$PATH_PATCH RAILS_ENV=$RAILS_ENV bin/background_jobs start"
5151
sidekiq=$?
5252
[ $sidekiq -eq 0 ] && touch $SLOCK
5353
echo
@@ -121,4 +121,4 @@ case "$1" in
121121
;;
122122
esac
123123

124-
exit 0
124+
exit 0

0 commit comments

Comments
 (0)