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