move uploads to /var

This commit is contained in:
Praveen Arimbrathodiyil 2016-02-13 20:38:31 +05:30
parent 58ebc5700a
commit c40b9fc787
2 changed files with 5 additions and 3 deletions

1
debian/gitlab.links vendored
View file

@ -1,3 +1,4 @@
var/lib/gitlab/uploads usr/share/gitlab/public/uploads
etc/gitlab/unicorn.rb usr/share/gitlab/config/unicorn.rb
etc/gitlab/database.yml usr/share/gitlab/config/database.yml
etc/gitlab/gitlab.yml usr/share/gitlab/config/gitlab.yml

7
debian/postinst vendored
View file

@ -40,10 +40,11 @@ case "$1" in
. /usr/lib/gitlab/scripts/adduser.sh
gitlab_repo_path=${gitlab_data_dir}/repositories
gitlab_uploads_path=${gitlab_data_dir}/uploads
# Create directories and change ownership
for i in ${gitlab_repo_path} ${gitlab_pid_path} ${gitlab_log_dir}\
${gitlab_shell_log}; do
for i in ${gitlab_repo_path} ${gitlab_uploads_path} ${gitlab_pid_path}\
${gitlab_log_dir} ${gitlab_shell_log}; do
mkdir -p $i
chown -R ${gitlab_user}: $i
done
@ -56,7 +57,7 @@ case "$1" in
chown -R ${gitlab_user}: $i
done
su ${gitlab_user} -s /bin/sh -c "mkdir -p -m 750 ${gitlab_home}/public/uploads"
su ${gitlab_user} -s /bin/sh -c "chmod 750 ${gitlab_uploads_path}"
su ${gitlab_user} -s /bin/sh -c "mkdir -p ${gitlab_pid_path}/pids"
su ${gitlab_user} -s /bin/sh -c "mkdir -p ${gitlab_pid_path}/sockets"
su ${gitlab_user} -s /bin/sh -c 'git config --global core.autocrlf "input"'