diff options
author | Victor Shyba <victor.shyba@gmail.com> | 2015-06-07 06:22:50 -0300 |
---|---|---|
committer | Victor Shyba <victor.shyba@gmail.com> | 2015-06-07 06:23:33 -0300 |
commit | a6d2be2e827097fcd89d7759d677e420723cb607 (patch) | |
tree | f01b24afaa618198c0c7138ba2acae17b2a29c58 /service | |
parent | b0305a6645138e12307c0cfb86461c6705b31664 (diff) |
events server can also run on random port
With this last change, it is now possible to run more than one user
agent on same pc without docker. With a fixed one it would raise port
already in use and it is not configurable, making it impossible to run
multiple activist UA.
Diffstat (limited to 'service')
-rw-r--r-- | service/pixelated/config/leap.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/service/pixelated/config/leap.py b/service/pixelated/config/leap.py index 0bdc91d5..f13a3fc7 100644 --- a/service/pixelated/config/leap.py +++ b/service/pixelated/config/leap.py @@ -1,4 +1,5 @@ from __future__ import absolute_import +import random from pixelated.config import credentials from leap.common.events import server as events_server import pixelated.bitmask_libraries.certs as certs @@ -13,7 +14,7 @@ def initialize_leap(leap_provider_cert, init_monkeypatches() provider, user, password = credentials.read(organization_mode, credentials_file) init_leap_cert(leap_provider_cert, leap_provider_cert_fingerprint) - events_server.ensure_server(port=8090) + events_server.ensure_server(random.randrange(8000, 11999)) leap_session = create_leap_session(provider, user, password, leap_home) leap_session.start_background_jobs() return leap_session |