Skip to content

Commit

Permalink
alternative solution to #13434
Browse files Browse the repository at this point in the history
  • Loading branch information
AUTOMATIC1111 committed Sep 30, 2023
1 parent 1b9ca01 commit ad3b8a1
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion modules/restart.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,9 @@ def is_restartable() -> bool:
def restart_program() -> None:
"""creates file tmp/restart and immediately stops the process, which webui.bat/webui.sh interpret as a command to start webui again"""

(Path(script_path) / "tmp" / "restart").touch()
tmpdir = Path(script_path) / "tmp"
tmpdir.mkdir(parents=True, exist_ok=True)
(tmpdir / "restart").touch()

stop_program()

Expand Down

0 comments on commit ad3b8a1

Please sign in to comment.