mirror of
https://github.com/gitlabhq/gitlab-recipes.git
synced 2026-01-10 06:58:06 -05:00
Merge branch 'script_to_bin' into 'master'
Move from script to bin Reminder to merge when 7.0 gets released.
This commit is contained in:
@@ -2,7 +2,7 @@
|
||||
#
|
||||
# GitLab
|
||||
# Contributors : @elvanja, @troyanov, @eiyaya, @foyo23, @nielsbasjes, @relip, @JasonMing, @andronat, @axilleas
|
||||
# App Version : 6.x
|
||||
# App Version : 6.x - 7.x
|
||||
|
||||
# chkconfig: 2345 82 55
|
||||
# processname: sidekiq
|
||||
@@ -37,7 +37,7 @@ start() {
|
||||
|
||||
# Start sidekiq
|
||||
echo -n $"Starting sidekiq: "
|
||||
daemon --pidfile=$SPID --user=$USER "$PATH_PATCH RAILS_ENV=$RAILS_ENV script/background_jobs start"
|
||||
daemon --pidfile=$SPID --user=$USER "$PATH_PATCH RAILS_ENV=$RAILS_ENV bin/background_jobs start"
|
||||
sidekiq=$?
|
||||
[ $sidekiq -eq 0 ] && touch $SLOCK
|
||||
echo
|
||||
|
||||
17
init/sysvinit/centos/gitlab-puma
Normal file → Executable file
17
init/sysvinit/centos/gitlab-puma
Normal file → Executable file
@@ -2,7 +2,7 @@
|
||||
#
|
||||
# GitLab
|
||||
# Contributors : @elvanja, @troyanov, @eiyaya, @foyo23, @nielsbasjes, @relip, @JasonMing, @andronat
|
||||
# App Version : 6.x
|
||||
# App Version : 6.x -7.x
|
||||
|
||||
# chkconfig: 2345 82 55
|
||||
# processname: puma
|
||||
@@ -24,6 +24,9 @@ ORIGINAL_PATH=$PATH
|
||||
# Restore original $PATH
|
||||
PATH=$ORIGINAL_PATH
|
||||
|
||||
### Environment variables
|
||||
RAILS_ENV="production"
|
||||
|
||||
# The name of the service
|
||||
NAME=git
|
||||
|
||||
@@ -32,8 +35,8 @@ USER=git
|
||||
APP_PATH=/home/$USER/gitlab
|
||||
|
||||
# The PID and LOCK files used by puma and sidekiq
|
||||
UPID=$APP_PATH/tmp/pids/puma.pid
|
||||
ULOCK=/var/lock/subsys/puma
|
||||
PPID=$APP_PATH/tmp/pids/puma.pid
|
||||
PLOCK=/var/lock/subsys/puma
|
||||
SPID=$APP_PATH/tmp/pids/sidekiq.pid
|
||||
SLOCK=/var/lock/subsys/sidekiq
|
||||
|
||||
@@ -51,12 +54,12 @@ start() {
|
||||
echo -n $"Starting puma: "
|
||||
daemon --pidfile=$UPID --user=$USER "$RUBY_PATH_PATCH bundle exec puma $OPTS"
|
||||
puma=$?
|
||||
[ $puma -eq 0 ] && touch $ULOCK
|
||||
[ $puma -eq 0 ] && touch $PLOCK
|
||||
echo
|
||||
|
||||
# Start sidekiq
|
||||
echo -n $"Starting sidekiq: "
|
||||
daemon --pidfile=$SPID --user=$USER "$RUBY_PATH_PATCH RAILS_ENV=production bundle exec rake sidekiq:start"
|
||||
daemon --pidfile=$SPID --user=$USER "$RUBY_PATH_PATCH RAILS_ENV=$RAILS_ENV bin/background_jobs start"
|
||||
sidekiq=$?
|
||||
[ $sidekiq -eq 0 ] && touch $SLOCK
|
||||
echo
|
||||
@@ -72,7 +75,7 @@ stop() {
|
||||
echo -n $"Stopping puma: "
|
||||
killproc -p $UPID
|
||||
puma=$?
|
||||
[ $puma -eq 0 ] && rm -f $ULOCK
|
||||
[ $puma -eq 0 ] && rm -f $PLOCK
|
||||
echo
|
||||
|
||||
# Stop sidekiq
|
||||
@@ -92,7 +95,7 @@ restart() {
|
||||
}
|
||||
|
||||
get_status() {
|
||||
status -p $UPID puma
|
||||
status -p $PPID puma
|
||||
status -p $SPID sidekiq
|
||||
}
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
#
|
||||
# GitLab
|
||||
# Contributors : @elvanja, @troyanov, @eiyaya, @foyo23, @nielsbasjes, @relip, @JasonMing, @andronat, @axilleas, @mdirkse
|
||||
# App Version : 6.x
|
||||
# App Version : 6.x - 7.x
|
||||
|
||||
# chkconfig: 2345 82 55
|
||||
# processname: unicorn
|
||||
@@ -40,14 +40,14 @@ start() {
|
||||
|
||||
# Start unicorn
|
||||
echo -n $"Starting unicorn: "
|
||||
daemon --pidfile=$UPID --user=$USER "$PATH_PATCH RAILS_ENV=$RAILS_ENV script/web start"
|
||||
daemon --pidfile=$UPID --user=$USER "$PATH_PATCH RAILS_ENV=$RAILS_ENV bin/web start"
|
||||
unicorn=$?
|
||||
[ $unicorn -eq 0 ] && touch $ULOCK
|
||||
echo
|
||||
|
||||
# Start sidekiq
|
||||
echo -n $"Starting sidekiq: "
|
||||
daemon --pidfile=$SPID --user=$USER "$PATH_PATCH RAILS_ENV=$RAILS_ENV script/background_jobs start"
|
||||
daemon --pidfile=$SPID --user=$USER "$PATH_PATCH RAILS_ENV=$RAILS_ENV bin/background_jobs start"
|
||||
sidekiq=$?
|
||||
[ $sidekiq -eq 0 ] && touch $SLOCK
|
||||
echo
|
||||
@@ -121,4 +121,4 @@ case "$1" in
|
||||
;;
|
||||
esac
|
||||
|
||||
exit 0
|
||||
exit 0
|
||||
|
||||
Reference in New Issue
Block a user