diff options
author | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2014-09-11 13:50:29 +0300 |
---|---|---|
committer | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2014-09-11 13:50:29 +0300 |
commit | 57865ae234b8e80be5df7a31d3eb27c17395228c (patch) | |
tree | dc2dc4181e1d2670d5df1f99f394b0e34d4d72e6 | |
parent | 3f365414444fee37d098c35f4dddd3ad6a4baf1d (diff) | |
parent | 38af3f1e2fa517b208ab8fb1e37685af214a7a00 (diff) | |
download | gitlab-shell-57865ae234b8e80be5df7a31d3eb27c17395228c.tar.gz |
Merge pull request #141 from attiks/support-redis-password
added support for redis password
-rw-r--r-- | config.yml.example | 1 | ||||
-rw-r--r-- | lib/gitlab_config.rb | 6 |
2 files changed, 6 insertions, 1 deletions
diff --git a/config.yml.example b/config.yml.example index bc41c25..972b539 100644 --- a/config.yml.example +++ b/config.yml.example @@ -29,6 +29,7 @@ redis: bin: /usr/bin/redis-cli host: 127.0.0.1 port: 6379 + # pass: redispass # Allows you to specify the password for Redis # socket: /tmp/redis.socket # Only define this if you want to use sockets namespace: resque:gitlab diff --git a/lib/gitlab_config.rb b/lib/gitlab_config.rb index ad15247..816da2c 100644 --- a/lib/gitlab_config.rb +++ b/lib/gitlab_config.rb @@ -53,7 +53,11 @@ class GitlabConfig if redis.has_key?("socket") %W(#{redis['bin']} -s #{redis['socket']}) else - %W(#{redis['bin']} -h #{redis['host']} -p #{redis['port']}) + if redis.has_key?("pass") + %W(#{redis['bin']} -h #{redis['host']} -p #{redis['port']} -a #{redis['pass']}) + else + %W(#{redis['bin']} -h #{redis['host']} -p #{redis['port']}) + end end end end |