Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-shell
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-shell
Commits
ba2248f9
Commit
ba2248f9
authored
Nov 14, 2013
by
Jonathan A. Sternberg
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Redis configuration check
The bin/check script now checks if Redis is configured properly.
parent
4e15496c
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
3 deletions
+9
-3
bin/check
bin/check
+9
-3
No files found.
bin/check
View file @
ba2248f9
...
@@ -12,13 +12,13 @@ resp = GitlabNet.new.check
...
@@ -12,13 +12,13 @@ resp = GitlabNet.new.check
if
resp
.
code
==
"200"
if
resp
.
code
==
"200"
print
'OK'
print
'OK'
else
else
puts
"FAILED. code:
#{
resp
.
code
}
"
abort
"FAILED. code:
#{
resp
.
code
}
"
end
end
puts
"
\n
Check directories and files: "
puts
"
\n
Check directories and files: "
config
=
GitlabConfig
.
new
config
=
GitlabConfig
.
new
dirs
=
[
config
.
repos_path
,
config
.
auth_file
,
config
.
redis
[
'bin'
]
]
dirs
=
[
config
.
repos_path
,
config
.
auth_file
]
dirs
.
each
do
|
dir
|
dirs
.
each
do
|
dir
|
abort
(
"ERROR: missing option in config.yml"
)
unless
dir
abort
(
"ERROR: missing option in config.yml"
)
unless
dir
...
@@ -26,7 +26,13 @@ dirs.each do |dir|
...
@@ -26,7 +26,13 @@ dirs.each do |dir|
if
File
.
exists?
(
dir
)
if
File
.
exists?
(
dir
)
print
'OK'
print
'OK'
else
else
puts
"FAILED"
abort
"FAILED"
end
end
puts
"
\n
"
puts
"
\n
"
end
end
print
"Test redis-cli executable: "
abort
(
'FAILED'
)
unless
system
(
*
config
.
redis_command
,
'--version'
)
print
"Send ping to redis server: "
abort
unless
system
(
*
config
.
redis_command
,
'ping'
)
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