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