Fix Frigate stuck at finishing when restarting from UI (#5216)

This commit is contained in:
Felipe Santos 2023-01-24 10:27:57 -03:00 committed by GitHub
parent f52de322d3
commit feeb7107d5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -628,7 +628,12 @@ def clipped(obj, frame_shape):
def restart_frigate():
# S6 overlay is configured to exit once the Frigate process exits
proc = psutil.Process(1)
# if this is running via s6, sigterm pid 1
if proc.name() == "s6-svscan":
proc.terminate()
# otherwise, just try and exit frigate
else:
os.kill(os.getpid(), signal.SIGTERM)