Restart: only do restart if running via the wrapper script

This commit is contained in:
Aarni Koskela
2023-06-05 20:04:28 +03:00
parent 9781f31f74
commit 46a5bd64ed
5 changed files with 33 additions and 13 deletions

View File

@@ -853,12 +853,3 @@ def walk_files(path, allowed_extensions=None):
continue
yield os.path.join(root, filename)
def restart_program():
"""creates file tmp/restart and immediately stops the process, which webui.bat/webui.sh interpret as a command to start webui again"""
with open(os.path.join(script_path, "tmp", "restart"), "w"):
pass
os._exit(0)