mirror of
https://github.com/blakeblackshear/frigate.git
synced 2026-02-03 17:55:21 +03:00
Support for dynamic MQTT user configuration #4883
This commit is contained in:
parent
57dce4ec38
commit
6c2e2d7b6d
@ -53,6 +53,9 @@ mqtt:
|
|||||||
client_id: frigate
|
client_id: frigate
|
||||||
# Optional: user
|
# Optional: user
|
||||||
user: mqtt_user
|
user: mqtt_user
|
||||||
|
# NOTE: MQTT user can be specified with an environment variables that must begin with 'FRIGATE_'.
|
||||||
|
# e.g. user: '{FRIGATE_MQTT_USER}'
|
||||||
|
password: password
|
||||||
# Optional: password
|
# Optional: password
|
||||||
# NOTE: MQTT password can be specified with an environment variables that must begin with 'FRIGATE_'.
|
# NOTE: MQTT password can be specified with an environment variables that must begin with 'FRIGATE_'.
|
||||||
# e.g. password: '{FRIGATE_MQTT_PASSWORD}'
|
# e.g. password: '{FRIGATE_MQTT_PASSWORD}'
|
||||||
|
|||||||
@ -866,6 +866,9 @@ class FrigateConfig(FrigateBaseModel):
|
|||||||
# MQTT password substitution
|
# MQTT password substitution
|
||||||
if config.mqtt.password:
|
if config.mqtt.password:
|
||||||
config.mqtt.password = config.mqtt.password.format(**FRIGATE_ENV_VARS)
|
config.mqtt.password = config.mqtt.password.format(**FRIGATE_ENV_VARS)
|
||||||
|
# MQTT user substitution
|
||||||
|
if config.mqtt.user:
|
||||||
|
config.mqtt.user = config.mqtt.user.format(**FRIGATE_ENV_VARS)
|
||||||
|
|
||||||
# Global config to propagate down to camera level
|
# Global config to propagate down to camera level
|
||||||
global_config = config.dict(
|
global_config = config.dict(
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user