From 5049c91475bb8b78b5ad6c4f63892fcbd63d82f0 Mon Sep 17 00:00:00 2001 From: Sergey Krashevich Date: Tue, 20 Jun 2023 00:22:23 +0300 Subject: [PATCH] Add sending SIGHUP signal to Nginx master process in app.py --- frigate/app.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/frigate/app.py b/frigate/app.py index 39bcb37d4..d202ba266 100644 --- a/frigate/app.py +++ b/frigate/app.py @@ -225,6 +225,13 @@ class FrigateApp: ) f.write(line) + # get the nginx master process id + with open("/var/run/nginx.pid", "r") as pid_file: + pid = int(pid_file.read().strip()) + + # sending SIGHUP signal to nginx master process + os.kill(pid, signal.SIGHUP) + def init_go2rtc(self) -> None: for proc in psutil.process_iter(["pid", "name"]): if proc.info["name"] == "go2rtc":