diff options
author | varac <varacanero@zeromail.org> | 2017-03-15 00:56:47 +0100 |
---|---|---|
committer | varac <varacanero@zeromail.org> | 2017-03-15 19:22:50 +0100 |
commit | 8c1c4c102936dd779c74d615763e7adef7033ec1 (patch) | |
tree | 67ef14ec1748ce68bc9751d2fa0d2a1bf9baf7f1 /lib | |
parent | 5035b80537d4f6d4f4d57a3a429d12fc4ca04d54 (diff) |
Direct connection when couch runs locally
Diffstat (limited to 'lib')
-rw-r--r-- | lib/leap_cli/macros/stunnel.rb | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/lib/leap_cli/macros/stunnel.rb b/lib/leap_cli/macros/stunnel.rb index 821bda38..59a38fad 100644 --- a/lib/leap_cli/macros/stunnel.rb +++ b/lib/leap_cli/macros/stunnel.rb @@ -87,6 +87,18 @@ module LeapCli } end + # + # what it the port of the couchdb we should connect to. + # host will always be localhost. + # + def couchdb_port + if services.include?('couchdb') + couch.port + else + stunnel.clients.couch_client.values.first.accept_port + end + end + private # @@ -103,4 +115,4 @@ module LeapCli end end -end
\ No newline at end of file +end |