From c4c9049e24046c84bb37d4a60bfd7719eb267287 Mon Sep 17 00:00:00 2001 From: cclohmar Date: Thu, 6 Aug 2026 13:16:02 +0100 Subject: [PATCH] fix: go2rtc config path absolute, gitignore generated file --- .gitignore | 1 + go2rtc.go | 6 +++--- go2rtc.yaml | 5 ----- 3 files changed, 4 insertions(+), 8 deletions(-) delete mode 100644 go2rtc.yaml diff --git a/.gitignore b/.gitignore index e8e5d5f..167cbb1 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,2 @@ nextnvr +go2rtc.yaml diff --git a/go2rtc.go b/go2rtc.go index ac94c1f..191d146 100644 --- a/go2rtc.go +++ b/go2rtc.go @@ -46,7 +46,7 @@ func (g *Go2RTCManager) Start(cameras []CameraConfig) error { } // Launch go2rtc as a child process. - g.cmd = exec.Command(g.config.Binary, "-config", "go2rtc.yaml") + g.cmd = exec.Command(g.config.Binary, "-config", "/opt/nextnvr/go2rtc.yaml") g.cmd.Stdout = os.Stdout g.cmd.Stderr = os.Stderr @@ -100,7 +100,7 @@ func (g *Go2RTCManager) monitor() { g.mu.Lock() if g.running { - g.cmd = exec.Command(g.config.Binary, "-config", "go2rtc.yaml") + g.cmd = exec.Command(g.config.Binary, "-config", "/opt/nextnvr/go2rtc.yaml") g.cmd.Stdout = os.Stdout g.cmd.Stderr = os.Stderr if startErr := g.cmd.Start(); startErr != nil { @@ -144,5 +144,5 @@ func (g *Go2RTCManager) writeConfig(cameras []CameraConfig) error { sb.WriteString(fmt.Sprintf(" %s_main: %s\n", cam.ID, mainURL)) } - return os.WriteFile("go2rtc.yaml", []byte(sb.String()), 0600) + return os.WriteFile("/opt/nextnvr/go2rtc.yaml", []byte(sb.String()), 0600) } diff --git a/go2rtc.yaml b/go2rtc.yaml deleted file mode 100644 index a3a8623..0000000 --- a/go2rtc.yaml +++ /dev/null @@ -1,5 +0,0 @@ -# go2rtc configuration — generated by NextNVR -api: - listen: ":1984" - -streams: