diff options
author | Ivan Alejandro <ivanalejandro0@gmail.com> | 2014-12-19 19:16:42 -0300 |
---|---|---|
committer | Ivan Alejandro <ivanalejandro0@gmail.com> | 2014-12-29 18:33:21 -0300 |
commit | 75e340bc41803d6fa32df673bb8b1f4e045d4261 (patch) | |
tree | 98b23ed17c5cfb45d0b636c8905d236381e7fb5c /src/leap/bitmask/backend_app.py | |
parent | ebcf316318c344ab256ec073d841aa04f3d18d46 (diff) |
Create the certificates if they don't exist.
Fix typo for signal disconnection.
The backend is the one who always creates the certificates. Either if it
is run separately or in a process in the same app as the frontend.
Diffstat (limited to 'src/leap/bitmask/backend_app.py')
-rw-r--r-- | src/leap/bitmask/backend_app.py | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/leap/bitmask/backend_app.py b/src/leap/bitmask/backend_app.py index ce75dc80..286b04f7 100644 --- a/src/leap/bitmask/backend_app.py +++ b/src/leap/bitmask/backend_app.py @@ -22,7 +22,7 @@ import multiprocessing import signal from leap.bitmask.backend.leapbackend import LeapBackend -from leap.bitmask.backend.utils import generate_certificates +from leap.bitmask.backend.utils import generate_zmq_certificates from leap.bitmask.logs.utils import create_logger from leap.bitmask.util import dict_to_flags @@ -55,6 +55,10 @@ def run_backend(bypass_checks=False, flags_dict=None, frontend_pid=None): :param flags_dict: a dict containing the flag values set on app start. :type flags_dict: dict """ + # The backend is the one who always creates the certificates. Either if it + # is run separately or in a process in the same app as the frontend. + generate_zmq_certificates() + # ignore SIGINT since app.py takes care of signaling SIGTERM to us. signal.signal(signal.SIGINT, signal.SIG_IGN) signal.signal(signal.SIGTERM, signal_handler) @@ -69,5 +73,4 @@ def run_backend(bypass_checks=False, flags_dict=None, frontend_pid=None): if __name__ == '__main__': logger = create_logger(debug=True) - generate_certificates() run_backend() |