Skip to content
Snippets Groups Projects
Commit 86874f00 authored by Dmitriy Zaporozhets's avatar Dmitriy Zaporozhets
Browse files

init.d: Ensure socket is removed before starting service

parent 02a7b127
No related branches found
No related tags found
3 merge requests!103705 2 stable,!4341Added wiki-page search for 5-2-stable, Fixed issue #4310,!4230Merge 5-2 stable into master (fixes guides, etc.)
Loading
Loading
@@ -2,7 +2,7 @@
 
# GITLAB
# Maintainer: @randx
# App Version: 5.1
# App Version: 5.2
 
### BEGIN INIT INFO
# Provides: gitlab
Loading
Loading
@@ -19,6 +19,7 @@ APP_ROOT="/home/git/gitlab"
APP_USER="git"
DAEMON_OPTS="-C $APP_ROOT/config/puma.rb"
PID_PATH="$APP_ROOT/tmp/pids"
SOCKET_PATH="$APP_ROOT/tmp/sockets"
WEB_SERVER_PID="$PID_PATH/puma.pid"
SIDEKIQ_PID="$PID_PATH/sidekiq.pid"
STOP_SIDEKIQ="RAILS_ENV=production bundle exec rake sidekiq:stop"
Loading
Loading
@@ -50,6 +51,7 @@ start() {
exit 1
else
if [ `whoami` = root ]; then
execute "rm $SOCKET_PATH/gitlab.socket"
execute "RAILS_ENV=production bundle exec puma $DAEMON_OPTS"
execute "mkdir -p $PID_PATH && $START_SIDEKIQ > /dev/null 2>&1 &"
echo "$DESC started"
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment