@@ -167,34 +167,6 @@ sed -i -e 's/\/home/\/var\/lib/g' /etc/nginx/sites-enabled/gitlab
167
167
168
168
### 8. Add/Update gitlab service and default files
169
169
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
-
198
170
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
199
171
200
172
``` bash
@@ -217,14 +189,20 @@ cd ~git
217
189
sudo -u git -H gitlab-shell/support/rewrite-hooks.sh
218
190
```
219
191
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
221
199
222
200
``` bash
223
201
sudo service gitlab restart
224
202
sudo service nginx restart
225
203
```
226
204
227
- ### 11 . Check application status
205
+ ### 13 . Check application status
228
206
229
207
Check if GitLab and its environment are configured correctly:
230
208
@@ -236,7 +214,7 @@ To make sure you didn't miss anything run a more thorough check with:
236
214
cd ~git/gitlab
237
215
sudo -u git -H bundle exec rake gitlab:check RAILS_ENV=production
238
216
239
- ### 12 . Remove old home
217
+ ### 14 . Remove old home
240
218
241
219
Once you are happy that everything is now working in the new directory, you can remove the old ` /home/git `
242
220
0 commit comments