Use app.Env for consistent env var access in frigate module
This commit is contained in:
@@ -3,7 +3,6 @@ package frigate
|
|||||||
import (
|
import (
|
||||||
"io"
|
"io"
|
||||||
"net/http"
|
"net/http"
|
||||||
"os"
|
|
||||||
"sync"
|
"sync"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
@@ -30,7 +29,7 @@ const requestTimeout = 5 * time.Second
|
|||||||
func Init() {
|
func Init() {
|
||||||
log = app.GetLogger("frigate")
|
log = app.GetLogger("frigate")
|
||||||
|
|
||||||
if url := os.Getenv("STRIX_FRIGATE_URL"); url != "" {
|
if url := app.Env("STRIX_FRIGATE_URL", ""); url != "" {
|
||||||
frigateURL = url
|
frigateURL = url
|
||||||
log.Info().Str("url", frigateURL).Msg("[frigate] using STRIX_FRIGATE_URL")
|
log.Info().Str("url", frigateURL).Msg("[frigate] using STRIX_FRIGATE_URL")
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user