2
2
3
3
# GITLAB
4
4
# Maintainer: @randx
5
- # App Version: 4 .0
5
+ # App Version: 5 .0
6
6
7
7
# ## BEGIN INIT INFO
8
8
# Provides: gitlab
15
15
# ## END INIT INFO
16
16
17
17
18
- APP_ROOT=" /home/gitlab /gitlab"
18
+ APP_ROOT=" /home/git /gitlab"
19
19
DAEMON_OPTS=" -c $APP_ROOT /config/unicorn.rb -E production"
20
20
PID_PATH=" $APP_ROOT /tmp/pids"
21
21
UNICORN_PID=" $PID_PATH /unicorn.pid"
@@ -45,8 +45,8 @@ start() {
45
45
exit 1
46
46
else
47
47
if [ ` whoami` = root ]; then
48
- sudo -u gitlab -H bash -l -c " nohup bundle exec unicorn_rails $DAEMON_OPTS > /dev/null 2>&1 &"
49
- sudo -u gitlab -H bash -l -c " mkdir -p $PID_PATH && $START_SIDEKIQ > /dev/null 2>&1 &"
48
+ sudo -u git -H bash -l -c " nohup bundle exec unicorn_rails $DAEMON_OPTS > /dev/null 2>&1 &"
49
+ sudo -u git -H bash -l -c " mkdir -p $PID_PATH && $START_SIDEKIQ > /dev/null 2>&1 &"
50
50
echo " $DESC started"
51
51
fi
52
52
fi
@@ -58,7 +58,7 @@ stop() {
58
58
if [ " $PID " -ne 0 -a " $STATUS " -ne 0 ]; then
59
59
# # Program is running, stop it.
60
60
kill -QUIT ` cat $UNICORN_PID `
61
- sudo -u gitlab -H bash -l -c " mkdir -p $PID_PATH && $STOP_SIDEKIQ > /dev/null 2>&1 &"
61
+ sudo -u git -H bash -l -c " mkdir -p $PID_PATH && $STOP_SIDEKIQ > /dev/null 2>&1 &"
62
62
rm " $UNICORN_PID " >> /dev/null
63
63
echo " $DESC stopped"
64
64
else
@@ -74,9 +74,9 @@ restart() {
74
74
if [ " $PID " -ne 0 -a " $STATUS " -ne 0 ]; then
75
75
echo " Restarting $DESC ..."
76
76
kill -USR2 ` cat $UNICORN_PID `
77
- sudo -u gitlab -H bash -l -c " mkdir -p $PID_PATH && $STOP_SIDEKIQ > /dev/null 2>&1 &"
77
+ sudo -u git -H bash -l -c " mkdir -p $PID_PATH && $STOP_SIDEKIQ > /dev/null 2>&1 &"
78
78
if [ ` whoami` = root ]; then
79
- sudo -u gitlab -H bash -l -c " mkdir -p $PID_PATH && $START_SIDEKIQ > /dev/null 2>&1 &"
79
+ sudo -u git -H bash -l -c " mkdir -p $PID_PATH && $START_SIDEKIQ > /dev/null 2>&1 &"
80
80
fi
81
81
echo " $DESC restarted."
82
82
else
0 commit comments