work on net controller

This commit is contained in:
Kevin Froman 2018-01-19 03:16:38 -06:00
parent 388752c079
commit 9d91e77ec5
No known key found for this signature in database
GPG key ID: 0D414D0FE405B63B
4 changed files with 26 additions and 7 deletions

View file

@ -24,6 +24,7 @@ import sys, os, configparser, base64, random, getpass, shutil, subprocess, reque
import gui, api, colors, core
from onionrutils import OnionrUtils
from colors import Colors
from netcontroller import NetController
class Onionr:
def __init__(self):
@ -118,6 +119,10 @@ class Onionr:
''' Start the Onionr communication daemon
'''
if not os.environ.get("WERKZEUG_RUN_MAIN") == "true":
net = NetController(self.config['PORT'])
print('Tor is starting...')
net.startTor(self.config['CLIENT']['PORT'])
time.sleep(5)
subprocess.Popen(["./communicator.py", "run"])
print('Started communicator')
api.API(self.config, self.debug)