forked from Github/frigate
Add healthcheck for go2rtc service (#5545)
* Upgrade s6-overlay from 3.1.3.0 to 3.1.4.0 * Add go2rtc healthcheck service Also don't make go2rtc exits cause the container to fail. * Reword healthcheck message Co-authored-by: Nicolas Mowen <nickmowen213@gmail.com> * Add timeout to go2rtc healthcheck * Update healthcheck message Co-authored-by: Nicolas Mowen <nickmowen213@gmail.com> * Give additional time for go2rtc start/restart * Fix typo * Avoid creating go2rtc config multiple times * Fix healthcheck not starting * Fix sleep * Fix more hidden logs * Decrease time window and use curl's timeout flag --------- Co-authored-by: Nicolas Mowen <nickmowen213@gmail.com>
This commit is contained in:
@@ -8,6 +8,7 @@ import yaml
|
||||
sys.path.insert(0, "/opt/frigate")
|
||||
from frigate.const import BIRDSEYE_PIPE, BTBN_PATH
|
||||
from frigate.ffmpeg_presets import parse_preset_hardware_acceleration_encode
|
||||
|
||||
sys.path.remove("/opt/frigate")
|
||||
|
||||
|
||||
@@ -50,7 +51,6 @@ if not go2rtc_config.get("webrtc", {}).get("candidates", []):
|
||||
else:
|
||||
print(
|
||||
"[INFO] Not injecting WebRTC candidates into go2rtc config as it has been set manually",
|
||||
file=sys.stderr,
|
||||
)
|
||||
|
||||
# sets default RTSP response to be equivalent to ?video=h264,h265&audio=aac
|
||||
@@ -95,5 +95,6 @@ if config.get("birdseye", {}).get("restream", False):
|
||||
else:
|
||||
go2rtc_config["streams"] = {"birdseye": ffmpeg_cmd}
|
||||
|
||||
|
||||
print(json.dumps(go2rtc_config))
|
||||
# Write go2rtc_config to /dev/shm/go2rtc.yaml
|
||||
with open("/dev/shm/go2rtc.yaml", "w") as f:
|
||||
yaml.dump(go2rtc_config, f)
|
||||
|
||||
Reference in New Issue
Block a user