[DRE-commits] [gitlab] 06/17: create log, pid and socket paths
Praveen Arimbrathodiyil
praveen at moszumanska.debian.org
Sat Feb 13 16:42:25 UTC 2016
This is an automated email from the git hooks/post-receive script.
praveen pushed a commit to branch master
in repository gitlab.
commit f57fd08e4ee4c7d6242d6cb13c18982ef71fbdb1
Author: Praveen Arimbrathodiyil <praveen at debian.org>
Date: Sat Feb 13 18:01:11 2016 +0530
create log, pid and socket paths
---
debian/postinst | 24 +++++++++++++++++-------
1 file changed, 17 insertions(+), 7 deletions(-)
diff --git a/debian/postinst b/debian/postinst
index e05fff7..05685fb 100755
--- a/debian/postinst
+++ b/debian/postinst
@@ -34,24 +34,34 @@ case "$1" in
# Read and export debian specific configuration
# Only exported variables will be passed on to gitlab app
gitlab_debian_conf=/etc/gitlab/gitlab-debian.conf
- for i in $(cat ${gitlab_debian_conf}); do export $i; done
+ export $(cat ${gitlab_debian_conf}|xargs)
# Create gitlab user
. /usr/lib/gitlab/scripts/adduser.sh
gitlab_repo_path=${gitlab_data_dir}/repositories
- mkdir -p ${gitlab_repo_path}
+
+ # Create directories and change ownership
+ for i in ${gitlab_repo_path} ${gitlab_pid_path} ${gitlab_log_dir}\
+ ${gitlab_shell_log}; do
+ mkdir $i
+ chown -R ${gitlab_user}: $i
+ done
+
+ # Customize permissions
chmod -R ug+rwX,o-rwx ${gitlab_repo_path}/
chmod -R ug-s ${gitlab_repo_path}/
find ${gitlab_repo_path}/ -type d -print0 | xargs -0 chmod g+s
- chown -R ${gitlab_user}: ${gitlab_home}
- chown -R ${gitlab_user}: ${gitlab_data_dir}
+ for i in ${gitlab_home} ${gitlab_data_dir} ${gitlab_shell_root}; do
+ chown -R ${gitlab_user}: $i
+ done
- mkdir -p ${gitlab_shell_log}
- chown -R ${gitlab_user}: ${gitlab_shell_root}
- chown -R ${gitlab_user}: ${gitlab_shell_log}
su ${gitlab_user} -s /bin/sh -c "mkdir -p -m 750 ${gitlab_home}/public/uploads"
+ 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"'
+
+ # Commands below needs to be run from gitlab_home
cd ${gitlab_home}
# Obtain hostname from debconf db
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-ruby-extras/gitlab.git
More information about the Pkg-ruby-extras-commits
mailing list