[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[tor-commits] [oonib/master] [hotfix] Only create bouncer endpoints when it's configured



commit f03f8055d44d3bbb7cbcfb789946ba67a94e1e52
Author: Arturo Filastò <arturo@xxxxxxxxxxx>
Date:   Thu May 26 13:49:28 2016 +0200

    [hotfix] Only create bouncer endpoints when it's configured
---
 oonib/oonibackend.py | 9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)

diff --git a/oonib/oonibackend.py b/oonib/oonibackend.py
index 33ea92d..601a972 100644
--- a/oonib/oonibackend.py
+++ b/oonib/oonibackend.py
@@ -163,9 +163,12 @@ if config.main.tor_hidden_service and \
     config.main.collector_endpoints = [ {'type': 'onion', 'hsdir': collector_hsdir} ]
 
 for endpoint_config in config.main.get('bouncer_endpoints', []):
-    print "Starting bouncer with config %s" % endpoint_config
-    endpoint = getEndpoint(endpoint_config)
-    createService(endpoint, 'bouncer', endpoint_config)
+    if config.main.bouncer_file:
+        print "Starting bouncer with config %s" % endpoint_config
+        endpoint = getEndpoint(endpoint_config)
+        createService(endpoint, 'bouncer', endpoint_config)
+    else:
+        print "No bouncer configured"
 
 for endpoint_config in config.main.get('collector_endpoints', []):
     print "Starting collector with config %s" % endpoint_config



_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits