diff options
author | Jonathan A. Sternberg <jonathansternberg@gmail.com> | 2013-11-14 12:41:04 -0500 |
---|---|---|
committer | Jonathan A. Sternberg <jonathansternberg@gmail.com> | 2013-11-20 13:51:42 -0500 |
commit | ba2248f968ba0806c3c97be10ee15a7560685dcd (patch) | |
tree | c65d918bc49853d92c4fa64d060acc524f8305dc | |
parent | 4e15496c8f1290928a47c2428bb62b75118e0c90 (diff) | |
download | gitlab-shell-ba2248f968ba0806c3c97be10ee15a7560685dcd.tar.gz |
Redis configuration check
The bin/check script now checks if Redis is configured properly.
-rwxr-xr-x | bin/check | 12 |
1 files changed, 9 insertions, 3 deletions
@@ -12,13 +12,13 @@ resp = GitlabNet.new.check if resp.code == "200" print 'OK' else - puts "FAILED. code: #{resp.code}" + abort "FAILED. code: #{resp.code}" end puts "\nCheck directories and files: " config = GitlabConfig.new -dirs = [config.repos_path, config.auth_file, config.redis['bin']] +dirs = [config.repos_path, config.auth_file] dirs.each do |dir| abort("ERROR: missing option in config.yml") unless dir @@ -26,7 +26,13 @@ dirs.each do |dir| if File.exists?(dir) print 'OK' else - puts "FAILED" + abort "FAILED" end puts "\n" 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') |