Skip to content

Commit c20da67

Browse files
committed
Merge pull request #56 from nafu/installation_patch
Up version to 5.0 and Change gitlab user to git user
2 parents eaa1f18 + e9f40a8 commit c20da67

File tree

2 files changed

+10
-10
lines changed

2 files changed

+10
-10
lines changed

init.d/gitlab

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
# GITLAB
44
# Maintainer: @randx
5-
# App Version: 4.1
5+
# App Version: 5.0
66

77
### BEGIN INIT INFO
88
# Provides: gitlab
@@ -15,7 +15,7 @@
1515
### END INIT INFO
1616

1717

18-
APP_ROOT="/home/gitlab/gitlab"
18+
APP_ROOT="/home/git/gitlab"
1919
DAEMON_OPTS="-c $APP_ROOT/config/unicorn.rb -E production"
2020
PID_PATH="$APP_ROOT/tmp/pids"
2121
UNICORN_PID="$PID_PATH/unicorn.pid"
@@ -45,8 +45,8 @@ start() {
4545
exit 1
4646
else
4747
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 &"
5050
echo "$DESC started"
5151
fi
5252
fi
@@ -58,7 +58,7 @@ stop() {
5858
if [ "$PID" -ne 0 -a "$STATUS" -ne 0 ]; then
5959
## Program is running, stop it.
6060
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 &"
6262
rm "$UNICORN_PID" >> /dev/null
6363
echo "$DESC stopped"
6464
else
@@ -74,9 +74,9 @@ restart() {
7474
if [ "$PID" -ne 0 -a "$STATUS" -ne 0 ]; then
7575
echo "Restarting $DESC..."
7676
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 &"
7878
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 &"
8080
fi
8181
echo "$DESC restarted."
8282
else

nginx/gitlab

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
11
# GITLAB
22
# Maintainer: @randx
3-
# App Version: 4.0
3+
# App Version: 5.0
44

55
upstream gitlab {
6-
server unix:/home/gitlab/gitlab/tmp/sockets/gitlab.socket;
6+
server unix:/home/git/gitlab/tmp/sockets/gitlab.socket;
77
}
88

99
server {
1010
listen YOUR_SERVER_IP:80 default_server; # e.g., listen 192.168.1.1:80;
1111
server_name YOUR_SERVER_FQDN; # e.g., server_name source.example.com;
12-
root /home/gitlab/gitlab/public;
12+
root /home/git/gitlab/public;
1313

1414
# individual nginx logs for this gitlab vhost
1515
access_log /var/log/nginx/gitlab_access.log;

0 commit comments

Comments
 (0)