Esempio n. 1
0
 def run_one_client(self,
                    process_name,
                    manager,
                    exploit=False,
                    show_ui=False):
     manager.add_process(
         process_name, '%s %s --config %s --exploit %s --show-ui %s' %
         (self.nobuffer, self.client, self.config, exploit, show_ui))
Esempio n. 2
0
def start_honcho(processes, env=None):
    manager = honcho.manager.Manager()
    for p in honcho.environ.expand_processes(processes, env=env):
        e = os.environ.copy()
        e.update(p.env)
        manager.add_process(p.name, p.cmd, env=e)
    manager.loop()
    sys.exit(manager.returncode)
Esempio n. 3
0
 def run_rlx_server(self, manager):
     if self.intersection(['all', 'servers', 'rlx-server']):
         if self.isconfigured('relaax_rlx_server'):
             manager.add_process(
                 'rlx-server', '%s relaax-rlx-server --config %s' %
                 (self.nobuffer, self.config))
         else:
             self.ctx.log(
                 click.style("rlx-server is not configured", fg='red'))
Esempio n. 4
0
 def run_wsproxy(self, manager):
     if self.intersection(['all', 'servers', 'wsproxy']):
         if self.isconfigured('relaax_wsproxy'):
             manager.add_process(
                 'wsproxy', '%s relaax-wsproxy --config %s' %
                 (self.nobuffer, self.config))
         elif self.intersection(['wsproxy']):
             # log error message only if wsproxy specified explicitly
             self.ctx.log(click.style("wsproxy is not configured",
                                      fg='red'))
Esempio n. 5
0
def run_daemons(daemons):
    import honcho.manager

    root = (Path(current_app.root_path) / "..").resolve()
    if not (root / ".git").exists():
        print(f"root = {root}")
        print("project must be installed in development mode")
        sys.exit(1)

    manager = honcho.manager.Manager()
    for name, cmd in daemons:
        manager.add_process(name, cmd, cwd=str(root))

    manager.loop()
    sys.exit(manager.returncode)