Skip to content

Commit 301399f

Browse files
committed
update doc for moving home
* update the logrotate files * remove patches for /etc/init.d/gitlab, as this works now in 6.5.0 * update the header numbers * move the directory to more a descriptive name, and renamed file to README.md
1 parent 1211761 commit 301399f

File tree

1 file changed

+9
-31
lines changed

1 file changed

+9
-31
lines changed

misc/homedir/movedir.md renamed to misc/change-git-home-directory/README.md

Lines changed: 9 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -167,34 +167,6 @@ sed -i -e 's/\/home/\/var\/lib/g' /etc/nginx/sites-enabled/gitlab
167167

168168
### 8. Add/Update gitlab service and default files
169169

170-
We need to apply the following patch to `/etc/init.d/gitlab`, This has been submitted as a
171-
PR already to gitlabhq. This enables to read the default file, and initialises other variables.
172-
Without this diff, other variables then also need to be defined in `/etc/default/gitlab`
173-
174-
```diff
175-
--- gitlab 2013-12-20 16:27:14.919395198 -0500
176-
+++ /etc/init.d/gitlab 2014-01-06 08:51:18.253120785 -0500
177-
@@ -31,14 +31,15 @@
178-
# internal /bin/sh variables such as PATH, EDITOR or SHELL.
179-
app_user="git"
180-
app_root="/home/$app_user/gitlab"
181-
+
182-
+# Read configuration variable file if it is present
183-
+test -f /etc/default/gitlab && . /etc/default/gitlab
184-
+
185-
pid_path="$app_root/tmp/pids"
186-
socket_path="$app_root/tmp/sockets"
187-
web_server_pid_path="$pid_path/unicorn.pid"
188-
sidekiq_pid_path="$pid_path/sidekiq.pid"
189-
190-
-# Read configuration variable file if it is present
191-
-test -f /etc/default/gitlab && . /etc/default/gitlab
192-
-
193-
# Switch to the app_user if it is not he/she who is running the script.
194-
if [ "$USER" != "$app_user" ]; then
195-
sudo -u "$app_user" -H -i $0 "$@"; exit;
196-
```
197-
198170
If you haven't already, copy the service default file, then do so, and then update the file to point to the new home directory
199171

200172
```bash
@@ -217,14 +189,20 @@ cd ~git
217189
sudo -u git -H gitlab-shell/support/rewrite-hooks.sh
218190
```
219191

220-
### 10. Restart application
192+
### 11. Update logrotate files
193+
194+
```
195+
sed -i -e 's/\/home/\/var\/lib/g' /etc/logrotate.d/gitlab
196+
```
197+
198+
### 12. Restart application
221199

222200
```bash
223201
sudo service gitlab restart
224202
sudo service nginx restart
225203
```
226204

227-
### 11. Check application status
205+
### 13. Check application status
228206

229207
Check if GitLab and its environment are configured correctly:
230208

@@ -236,7 +214,7 @@ To make sure you didn't miss anything run a more thorough check with:
236214
cd ~git/gitlab
237215
sudo -u git -H bundle exec rake gitlab:check RAILS_ENV=production
238216

239-
### 12. Remove old home
217+
### 14. Remove old home
240218

241219
Once you are happy that everything is now working in the new directory, you can remove the old `/home/git`
242220

0 commit comments

Comments
 (0)