mirror of
https://github.com/blakeblackshear/frigate.git
synced 2026-02-05 18:55:23 +03:00
Add sending SIGHUP signal to Nginx master process in app.py
This commit is contained in:
parent
67bf3a4a7b
commit
5049c91475
@ -225,6 +225,13 @@ class FrigateApp:
|
|||||||
)
|
)
|
||||||
f.write(line)
|
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:
|
def init_go2rtc(self) -> None:
|
||||||
for proc in psutil.process_iter(["pid", "name"]):
|
for proc in psutil.process_iter(["pid", "name"]):
|
||||||
if proc.info["name"] == "go2rtc":
|
if proc.info["name"] == "go2rtc":
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user