Skip to content

Commit

Permalink
Fix Frigate stuck at finishing when restarting from UI
Browse files Browse the repository at this point in the history
  • Loading branch information
felipecrs committed Jan 23, 2023
1 parent edbdbb7 commit 0385b0a
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions frigate/util.py
Original file line number Diff line number Diff line change
Expand Up @@ -628,8 +628,13 @@ def clipped(obj, frame_shape):


def restart_frigate():
# S6 overlay is configured to exit once the Frigate process exits
os.kill(os.getpid(), signal.SIGTERM)
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)


class EventsPerSecond:
Expand Down

0 comments on commit 0385b0a

Please sign in to comment.