Commit 58231f31 authored by Andrey Kumanyaev's avatar Andrey Kumanyaev

Replace hardcoded commands with data from config.yml

parent 491d3cee
......@@ -6,12 +6,15 @@ require_relative '../lib/gitlab_init'
# GitLab shell, invoked from ~/.ssh/authorized_keys
#
config = GitlabConfig.new
key_dir = config.auth_file.delete "authorized_keys"
commands = [
"mkdir -p /home/git/repositories",
"mkdir -p /home/git/.ssh",
"touch /home/git/.ssh/authorized_keys",
"chmod -R ug+rwX,o-rwx /home/git/repositories/",
"find /home/git/repositories -type d -print0 | xargs -0 chmod g+s"
"mkdir -p #{config.repos_path}",
"mkdir -p #{key_dir}",
"touch #{config.auth_file}",
"chmod -R ug+rwX,o-rwx #{config.repos_path}",
"find #{config.repos_path} -type d -print0 | xargs -0 chmod g+s"
]
commands.each do |cmd|
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment