summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xbin/install13
1 files changed, 8 insertions, 5 deletions
diff --git a/bin/install b/bin/install
index f6b0974..d7cb257 100755
--- a/bin/install
+++ b/bin/install
@@ -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|