mirror of
https://github.com/markqvist/LXMF.git
synced 2026-01-09 12:10:59 -05:00
Fix
This commit is contained in:
parent
7c9bdd7fa2
commit
ef2e1234a5
2 changed files with 18 additions and 16 deletions
|
|
@ -1365,20 +1365,24 @@ class LXMRouter:
|
|||
self.save_node_stats()
|
||||
|
||||
def sigint_handler(self, signal, frame):
|
||||
if not self.exit_handler_running:
|
||||
RNS.log("Received SIGINT, shutting down now!", RNS.LOG_WARNING)
|
||||
self.exit_handler()
|
||||
RNS.exit(0)
|
||||
if threading.current_thread() != threading.main_thread(): os._exit(0)
|
||||
else:
|
||||
RNS.log("Received SIGINT, but exit handler is running, keeping process alive until storage persist is complete", RNS.LOG_WARNING)
|
||||
if not self.exit_handler_running:
|
||||
RNS.log("Received SIGINT, shutting down now!", RNS.LOG_WARNING)
|
||||
self.exit_handler()
|
||||
RNS.exit(0)
|
||||
else:
|
||||
RNS.log("Received SIGINT, but exit handler is running, keeping process alive until storage persist is complete", RNS.LOG_WARNING)
|
||||
|
||||
def sigterm_handler(self, signal, frame):
|
||||
if not self.exit_handler_running:
|
||||
RNS.log("Received SIGTERM, shutting down now!", RNS.LOG_WARNING)
|
||||
self.exit_handler()
|
||||
RNS.exit(0)
|
||||
if threading.current_thread() != threading.main_thread(): os._exit(0)
|
||||
else:
|
||||
RNS.log("Received SIGTERM, but exit handler is running, keeping process alive until storage persist is complete", RNS.LOG_WARNING)
|
||||
if not self.exit_handler_running:
|
||||
RNS.log("Received SIGTERM, shutting down now!", RNS.LOG_WARNING)
|
||||
self.exit_handler()
|
||||
RNS.exit(0)
|
||||
else:
|
||||
RNS.log("Received SIGTERM, but exit handler is running, keeping process alive until storage persist is complete", RNS.LOG_WARNING)
|
||||
|
||||
def __str__(self):
|
||||
return "<LXMRouter "+RNS.hexrep(self.identity.hash, delimit=False)+">"
|
||||
|
|
|
|||
|
|
@ -319,11 +319,8 @@ def program_setup(configdir = None, rnsconfigdir = None, run_pn = False, on_inbo
|
|||
storagedir = configdir+"/storage"
|
||||
lxmdir = storagedir+"/messages"
|
||||
|
||||
if not os.path.isdir(storagedir):
|
||||
os.makedirs(storagedir)
|
||||
|
||||
if not os.path.isdir(lxmdir):
|
||||
os.makedirs(lxmdir)
|
||||
if not os.path.isdir(storagedir): os.makedirs(storagedir)
|
||||
if not os.path.isdir(lxmdir): os.makedirs(lxmdir)
|
||||
|
||||
if not os.path.isfile(configpath):
|
||||
RNS.log("Could not load config file, creating default configuration file...")
|
||||
|
|
@ -351,6 +348,7 @@ def program_setup(configdir = None, rnsconfigdir = None, run_pn = False, on_inbo
|
|||
# Start Reticulum
|
||||
RNS.log("Substantiating Reticulum...")
|
||||
reticulum = RNS.Reticulum(configdir=rnsconfigdir, loglevel=targetloglevel, logdest=targetlogdest)
|
||||
if targetlogdest == RNS.LOG_FILE: RNS.logfile = configdir+"/logfile"
|
||||
|
||||
# Generate or load primary identity
|
||||
if os.path.isfile(identitypath):
|
||||
|
|
@ -971,7 +969,7 @@ autopeer = yes
|
|||
# The maximum peering depth (in hops) for
|
||||
# automatically peered nodes.
|
||||
|
||||
autopeer_maxdepth = 4
|
||||
autopeer_maxdepth = 6
|
||||
|
||||
# The maximum amount of storage to use for
|
||||
# the LXMF Propagation Node message store,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue