Console should also beable to be controlled by env var

This commit is contained in:
Joren 2024-10-07 12:48:37 +02:00
parent a049610291
commit b1ba08933a
Signed by: Joren
GPG Key ID: 280E33DFBC0F1B55

View File

@ -69,6 +69,9 @@ func overrideConfigWithEnv() {
if envTempBaseDir := os.Getenv("TEMP_BASE_DIR"); envTempBaseDir != "" {
config.General.TempBaseDir = envTempBaseDir
}
if envEnableConsole := os.Getenv("ENABLE_CONSOLE"); envEnableConsole != "" {
config.General.EnableConsole = strings.ToLower(envEnableConsole) == "true"
}
if envWatchedFolder := os.Getenv("WATCHED_FOLDER"); envWatchedFolder != "" {
config.WatchFolder.Path = envWatchedFolder
}