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

Use git user now

parent 7e6a14f7
No related branches found
No related tags found
No related merge requests found
Loading
Loading
@@ -7,4 +7,4 @@ GitLab recipes for setup on different platforms, update etc...
 
# GITLAB
# Maintainer: @randx
# App Version: 2.9
# App Version: 5.0
Loading
Loading
@@ -2,7 +2,7 @@
 
# GITLAB
# Maintainer: @randx
# App Version: 4.0
# App Version: 5.0
 
### BEGIN INIT INFO
# Provides: gitlab
Loading
Loading
@@ -15,7 +15,7 @@
### END INIT INFO
 
 
APP_ROOT="/home/gitlab/gitlab"
APP_ROOT="/home/git/gitlab"
DAEMON_OPTS="-c $APP_ROOT/config/unicorn.rb -E production"
PID_PATH="$APP_ROOT/tmp/pids"
UNICORN_PID="$PID_PATH/unicorn.pid"
Loading
Loading
@@ -45,8 +45,8 @@ start() {
exit 1
else
if [ `whoami` = root ]; then
sudo -u gitlab -H bash -l -c "nohup bundle exec unicorn_rails $DAEMON_OPTS > /dev/null 2>&1 &"
sudo -u gitlab -H bash -l -c "mkdir -p $PID_PATH && $START_SIDEKIQ > /dev/null 2>&1 &"
sudo -u git -H bash -l -c "nohup bundle exec unicorn_rails $DAEMON_OPTS > /dev/null 2>&1 &"
sudo -u git -H bash -l -c "mkdir -p $PID_PATH && $START_SIDEKIQ > /dev/null 2>&1 &"
echo "$DESC started"
fi
fi
Loading
Loading
@@ -58,7 +58,7 @@ stop() {
if [ "$PID" -ne 0 -a "$STATUS" -ne 0 ]; then
## Program is running, stop it.
kill -QUIT `cat $UNICORN_PID`
sudo -u gitlab -H bash -l -c "mkdir -p $PID_PATH && $STOP_SIDEKIQ > /dev/null 2>&1 &"
sudo -u git -H bash -l -c "mkdir -p $PID_PATH && $STOP_SIDEKIQ > /dev/null 2>&1 &"
rm "$UNICORN_PID" >> /dev/null
echo "$DESC stopped"
else
Loading
Loading
@@ -74,9 +74,9 @@ restart() {
if [ "$PID" -ne 0 -a "$STATUS" -ne 0 ]; then
echo "Restarting $DESC..."
kill -USR2 `cat $UNICORN_PID`
sudo -u gitlab -H bash -l -c "mkdir -p $PID_PATH && $STOP_SIDEKIQ > /dev/null 2>&1 &"
sudo -u git -H bash -l -c "mkdir -p $PID_PATH && $STOP_SIDEKIQ > /dev/null 2>&1 &"
if [ `whoami` = root ]; then
sudo -u gitlab -H bash -l -c "mkdir -p $PID_PATH && $START_SIDEKIQ > /dev/null 2>&1 &"
sudo -u git -H bash -l -c "mkdir -p $PID_PATH && $START_SIDEKIQ > /dev/null 2>&1 &"
fi
echo "$DESC restarted."
else
Loading
Loading
Loading
Loading
@@ -3,7 +3,7 @@
# App Version: 4.0
 
upstream gitlab {
server unix:/home/gitlab/gitlab/tmp/sockets/gitlab.socket;
server unix:/home/git/gitlab/tmp/sockets/gitlab.socket;
}
 
server {
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