1
0
Fork 0
mirror of https://github.com/ossrs/srs.git synced 2025-03-09 15:49:59 +00:00

Config: Support set env_only by SRS_ENV_ONLY.

This commit is contained in:
winlin 2022-10-30 21:01:02 +08:00
parent 9f7a06bc9e
commit 9673bfb92c
3 changed files with 6 additions and 1 deletions

View file

@ -1848,6 +1848,9 @@ srs_error_t SrsConfig::parse_options(int argc, char** argv)
// first hello message.
srs_trace(_srs_version);
// Config the env_only_ by env.
if (getenv("SRS_ENV_ONLY")) env_only_ = true;
// Try config files as bellow:
// User specified config(not empty), like user/docker.conf
// If user specified *docker.conf, try *srs.conf, like user/srs.conf