Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kazuhiko Shiozaki
gitlab-ce
Commits
9988282e
Commit
9988282e
authored
Mar 09, 2012
by
Dmitriy Zaporozhets
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Diasgnostic task for gitlab
parent
51f7d949
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
58 additions
and
0 deletions
+58
-0
lib/tasks/gitlab_status.rake
lib/tasks/gitlab_status.rake
+58
-0
No files found.
lib/tasks/gitlab_status.rake
0 → 100644
View file @
9988282e
desc
"Check gitlab installation status"
task
:gitlab_status
=>
:environment
do
puts
"Starting diagnostic"
print
"config/database.yml............"
if
File
.
exists?
(
File
.
join
Rails
.
root
,
"config"
,
"database.yml"
)
puts
"exists"
.
green
else
puts
"missing"
.
red
return
end
print
"config/gitlab.yml............"
if
File
.
exists?
(
File
.
join
Rails
.
root
,
"config"
,
"gitlab.yml"
)
puts
"exists"
.
green
else
puts
"missing"
.
red
return
end
GIT_HOST
=
YAML
.
load_file
(
"
#{
Rails
.
root
}
/config/gitlab.yml"
)[
"git_host"
]
print
"/home/git/repositories/............"
if
File
.
exists?
(
GIT_HOST
[
'base_path'
])
puts
"exists"
.
green
else
puts
"missing"
.
red
return
end
print
"/home/git/repositories/ is writable?............"
if
File
.
stat
(
GIT_HOST
[
'base_path'
]).
writable?
puts
"YES"
.
green
else
puts
"NO"
.
red
return
end
begin
`git clone
#{
GIT_HOST
[
"admin_uri"
]
}
/tmp/gitolite_gitlab_test`
FileUtils
.
rm_rf
(
"/tmp/gitolite_gitlab_test"
)
print
"Can clone gitolite-admin?............"
puts
"YES"
.
green
rescue
print
"Can clone gitolite-admin?............"
puts
"NO"
.
red
return
end
print
"UMASK for .gitolite.rc is 0007? ............"
unless
open
(
"
#{
GIT_HOST
[
'base_path'
]
}
/../.gitolite.rc"
).
grep
(
/REPO_UMASK = 0007/
).
empty?
puts
"YES"
.
green
else
puts
"NO"
.
red
return
end
puts
"
\n
Finished"
end
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment