mirror of
https://github.com/markqvist/NomadNet.git
synced 2025-05-17 13:20:25 -04:00
Added daemon mode
This commit is contained in:
parent
34b377bafe
commit
c6e26e7f7f
10 changed files with 46 additions and 14 deletions
|
@ -46,7 +46,7 @@ class NomadNetworkApp:
|
|||
if issubclass(e_type, KeyboardInterrupt):
|
||||
sys.__excepthook__(e_type, e_value, e_traceback)
|
||||
|
||||
def __init__(self, configdir = None, rnsconfigdir = None):
|
||||
def __init__(self, configdir = None, rnsconfigdir = None, daemon = False):
|
||||
self.version = __version__
|
||||
self.enable_client = False
|
||||
self.enable_node = False
|
||||
|
@ -239,6 +239,10 @@ class NomadNetworkApp:
|
|||
job_thread.setDaemon(True)
|
||||
job_thread.start()
|
||||
|
||||
# Override UI choice from config on --daemon switch
|
||||
if daemon:
|
||||
self.uimode = nomadnet.ui.UI_NONE
|
||||
|
||||
# This stderr redirect is needed to stop urwid
|
||||
# from spewing KeyErrors to the console and thus,
|
||||
# messing up the UI. A pull request to fix the
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue