fork onionr when restarting or shutting down
This commit is contained in:
parent
c237efd523
commit
df57e2300e
@ -124,9 +124,9 @@ def kill_daemon():
|
||||
'''
|
||||
Shutdown the Onionr daemon (communicator)
|
||||
'''
|
||||
|
||||
logger.warn('Stopping the running daemon...', timestamp = False, terminal=True)
|
||||
try:
|
||||
os.fork()
|
||||
events.event('daemon_stop')
|
||||
net = NetController(config.get('client.port', 59496))
|
||||
try:
|
||||
|
@ -33,6 +33,7 @@ SCRIPT_NAME = os.path.dirname(os.path.realpath(__file__)) + f'/../../{onionrvalu
|
||||
|
||||
def restart():
|
||||
logger.info('Restarting Onionr', terminal=True)
|
||||
os.fork()
|
||||
daemonlaunch.kill_daemon()
|
||||
while localcommand.local_command('ping', maxWait=8) == 'pong!':
|
||||
time.sleep(0.3)
|
||||
|
Loading…
Reference in New Issue
Block a user