From 7a160d5e02d69a3849d78b987f31d4c64097a7a0 Mon Sep 17 00:00:00 2001 From: neko Date: Tue, 21 Jan 2025 19:18:20 +0500 Subject: [PATCH] Make sure unoserver restarts on crash --- main.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/main.py b/main.py index 502866a..f042384 100644 --- a/main.py +++ b/main.py @@ -57,7 +57,9 @@ def unoCheck(): # Check if unoserver even exists def unoStart(): unoserverPath = unoCheck() if unoserverPath: - subprocess.Popen(args=[unoserverPath, "--daemon"]) + retval = 1 + while retval != 0: + subprocess.Popen(args=[unoserverPath, "--daemon"]) else: return