diff --git a/onionr/onionrcommands/daemonlaunch.py b/onionr/onionrcommands/daemonlaunch.py index 78eef666..455a38cc 100755 --- a/onionr/onionrcommands/daemonlaunch.py +++ b/onionr/onionrcommands/daemonlaunch.py @@ -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: diff --git a/onionr/onionrcommands/restartonionr.py b/onionr/onionrcommands/restartonionr.py index 81adc073..12b7ef89 100644 --- a/onionr/onionrcommands/restartonionr.py +++ b/onionr/onionrcommands/restartonionr.py @@ -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)