diff options
| author | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2013-02-05 15:55:28 +0200 |
|---|---|---|
| committer | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2013-02-05 15:55:28 +0200 |
| commit | 43a55494f15084fe4c6ed5f9e7703a7bb092af86 (patch) | |
| tree | 3478175de330bbd90b0557e2db2aa09bbc5fb0a0 /bin | |
| parent | e7a4d233c47743acfc788767c93fd7153269be31 (diff) | |
| download | gitlab-shell-43a55494f15084fe4c6ed5f9e7703a7bb092af86.tar.gz | |
add check bin
Diffstat (limited to 'bin')
| -rwxr-xr-x | bin/check | 31 | ||||
| -rwxr-xr-x | bin/install | 1 |
2 files changed, 32 insertions, 0 deletions
diff --git a/bin/check b/bin/check new file mode 100755 index 0000000..e0c34ee --- /dev/null +++ b/bin/check @@ -0,0 +1,31 @@ +#!/usr/bin/env ruby + +require_relative '../lib/gitlab_init' +require_relative '../lib/gitlab_net' + +# +# GitLab shell check task +# + +print "Check GitLab API access: " +resp = GitlabNet.new.check +if resp.code == "200" + print 'OK' +else + puts "FAILED. code: #{resp.code}" +end + +puts "\nCheck directories and files: " + +config = GitlabConfig.new +dirs = [config.repos_path, config.auth_file] + +dirs.each do |dir| + print "\t#{dir}: " + if File.exists?(dir) + print 'OK' + else + puts "FAILED" + end + puts "\n" +end diff --git a/bin/install b/bin/install index c9f5be3..f6b0974 100755 --- a/bin/install +++ b/bin/install @@ -9,6 +9,7 @@ require_relative '../lib/gitlab_init' 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" ] |
