BigW Consortium Gitlab

Commit df67b25b by Dmitriy Zaporozhets

init.d: Ensure socket is removed before starting service

parent 1ed92561
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
# GITLAB # GITLAB
# Maintainer: @randx # Maintainer: @randx
# App Version: 5.1 # App Version: 5.2
### BEGIN INIT INFO ### BEGIN INIT INFO
# Provides: gitlab # Provides: gitlab
...@@ -19,6 +19,7 @@ APP_ROOT="/home/git/gitlab" ...@@ -19,6 +19,7 @@ APP_ROOT="/home/git/gitlab"
APP_USER="git" APP_USER="git"
DAEMON_OPTS="-C $APP_ROOT/config/puma.rb" DAEMON_OPTS="-C $APP_ROOT/config/puma.rb"
PID_PATH="$APP_ROOT/tmp/pids" PID_PATH="$APP_ROOT/tmp/pids"
SOCKET_PATH="$APP_ROOT/tmp/sockets"
WEB_SERVER_PID="$PID_PATH/puma.pid" WEB_SERVER_PID="$PID_PATH/puma.pid"
SIDEKIQ_PID="$PID_PATH/sidekiq.pid" SIDEKIQ_PID="$PID_PATH/sidekiq.pid"
STOP_SIDEKIQ="RAILS_ENV=production bundle exec rake sidekiq:stop" STOP_SIDEKIQ="RAILS_ENV=production bundle exec rake sidekiq:stop"
...@@ -50,6 +51,7 @@ start() { ...@@ -50,6 +51,7 @@ start() {
exit 1 exit 1
else else
if [ `whoami` = root ]; then if [ `whoami` = root ]; then
execute "rm $SOCKET_PATH/gitlab.socket"
execute "RAILS_ENV=production bundle exec puma $DAEMON_OPTS" execute "RAILS_ENV=production bundle exec puma $DAEMON_OPTS"
execute "mkdir -p $PID_PATH && $START_SIDEKIQ > /dev/null 2>&1 &" execute "mkdir -p $PID_PATH && $START_SIDEKIQ > /dev/null 2>&1 &"
echo "$DESC started" echo "$DESC started"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment