fix bug where onionr would complain while restarting about not being able to start
This commit is contained in:
parent
c5fd39c762
commit
b878faeb4c
3 changed files with 11 additions and 1 deletions
|
@ -214,6 +214,13 @@ def start(override: bool = False):
|
|||
Error exit if there is and its not overridden
|
||||
"""
|
||||
if os.path.exists(filepaths.lock_file) and not override:
|
||||
if os.path.exists(filepaths.restarting_indicator):
|
||||
try:
|
||||
os.remove(filepaths.restarting_indicator)
|
||||
except FileNotFoundError:
|
||||
pass
|
||||
else:
|
||||
return
|
||||
logger.fatal('Cannot start. Daemon is already running,'
|
||||
+ ' or it did not exit cleanly.\n'
|
||||
+ ' (if you are sure that there is not a daemon running,'
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue