mirror of
https://github.com/blakeblackshear/frigate.git
synced 2026-10-20 05:32:49 +03:00
tighten comments
This commit is contained in:
@@ -14,8 +14,8 @@ fi
|
|||||||
# Tell S6-Overlay not to restart this service
|
# Tell S6-Overlay not to restart this service
|
||||||
s6-svc -O .
|
s6-svc -O .
|
||||||
|
|
||||||
# Runs as root before any /config path enters the environment; -I skips the
|
# This runs as root before any /config path enters the environment; -I skips
|
||||||
# user site-packages under $HOME
|
# the user site-packages under $HOME
|
||||||
function set_libva_version() {
|
function set_libva_version() {
|
||||||
local ffmpeg_path
|
local ffmpeg_path
|
||||||
ffmpeg_path=$(python3 -I /usr/local/ffmpeg/get_ffmpeg_path.py)
|
ffmpeg_path=$(python3 -I /usr/local/ffmpeg/get_ffmpeg_path.py)
|
||||||
@@ -26,10 +26,10 @@ function set_libva_version() {
|
|||||||
echo "[INFO] Preparing Frigate..."
|
echo "[INFO] Preparing Frigate..."
|
||||||
set_libva_version
|
set_libva_version
|
||||||
|
|
||||||
# HOME=/root survives s6-setuidgid, so the drop sets HOME=/config. The runtime
|
# HOME=/root survives s6-setuidgid, so any run that is not root gets
|
||||||
# user owns /config, so these paths go only to the service process, never to
|
# HOME=/config explicitly. The runtime user owns /config, so these paths go
|
||||||
# root. Detector runtimes installed at first start (pip install --user) live
|
# only to the service process, never to root. Detector runtimes installed at
|
||||||
# under $HOME/.local.
|
# first start (pip install --user) live under $HOME/.local.
|
||||||
run_as=()
|
run_as=()
|
||||||
runtime_home="${HOME}"
|
runtime_home="${HOME}"
|
||||||
if [[ "$runs_as_root" -eq 0 ]]; then
|
if [[ "$runs_as_root" -eq 0 ]]; then
|
||||||
|
|||||||
@@ -199,8 +199,8 @@ if config.get("birdseye", {}).get("restream", False):
|
|||||||
go2rtc_config["streams"] = {"birdseye": ffmpeg_cmd}
|
go2rtc_config["streams"] = {"birdseye": ffmpeg_cmd}
|
||||||
|
|
||||||
# The run script removes the old file first. Exclusive create never follows a
|
# The run script removes the old file first. Exclusive create never follows a
|
||||||
# link the go2rtc user planted in sticky /dev/shm. 0640 because the config
|
# link the go2rtc user planted in sticky /dev/shm. The config contains camera
|
||||||
# contains camera credentials.
|
# credentials, so it is not world-readable.
|
||||||
fd = os.open(
|
fd = os.open(
|
||||||
"/dev/shm/go2rtc.yaml",
|
"/dev/shm/go2rtc.yaml",
|
||||||
os.O_WRONLY | os.O_CREAT | os.O_EXCL | os.O_NOFOLLOW,
|
os.O_WRONLY | os.O_CREAT | os.O_EXCL | os.O_NOFOLLOW,
|
||||||
|
|||||||
Reference in New Issue
Block a user