create .ssh/authorized_keys in postinst
This commit is contained in:
parent
1cb605e1d8
commit
184238ef63
2 changed files with 11 additions and 1 deletions
6
debian/changelog
vendored
6
debian/changelog
vendored
|
@ -1,3 +1,9 @@
|
|||
gitlab (8.9.0+dfsg-6) UNRELEASED; urgency=medium
|
||||
|
||||
* Create .ssh/authorized_keys in postinst
|
||||
|
||||
-- Pirate Praveen <praveen@debian.org> Wed, 20 Jul 2016 23:08:55 +0530
|
||||
|
||||
gitlab (8.9.0+dfsg-5) unstable; urgency=medium
|
||||
|
||||
* Tighten dependencies
|
||||
|
|
6
debian/postinst
vendored
6
debian/postinst
vendored
|
@ -53,13 +53,17 @@ case "$1" in
|
|||
|
||||
# Create directories and change ownership
|
||||
echo "Creating runtime directories for gitlab..."
|
||||
# Setup ssh key file
|
||||
mkdir ${gitlab_data_dir}/.ssh
|
||||
touch ${gitlab_data_dir}/.ssh/authorized_keys
|
||||
chown -R ${gitlab_user}: ${gitlab_data_dir}/.ssh
|
||||
# Create more required directories
|
||||
for i in ${gitlab_repo_path} ${gitlab_cache_path} ${gitlab_uploads_path}\
|
||||
${gitlab_pid_path} ${gitlab_log_dir} ${gitlab_shell_log} ${gitlab_builds_log}; do
|
||||
mkdir -p $i
|
||||
chown -R ${gitlab_user}: $i
|
||||
done
|
||||
|
||||
|
||||
# nginx/httpd should be able to connect to gitlab-workhorse.socket and serve public
|
||||
chown ${gitlab_user}:${nginx_user} -R ${gitlab_uploads_path}/.. ${gitlab_pid_path}
|
||||
|
||||
|
|
Loading…
Reference in a new issue