-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #20 from bigbluebutton/develop
chore: update from develop (1.4.0)
- Loading branch information
Showing
3 changed files
with
25 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,25 @@ | ||
const settings = require('./settings'); | ||
const fs = require('node:fs'); | ||
const _ = require('lodash'); | ||
|
||
const config = settings; | ||
const DEFAULT_SETTINGS_FILE_PATH = './settings.json'; | ||
const LOCAL_SETTINGS_FILE_PATH = '/etc/bigbluebutton/bbb-pads.json'; | ||
|
||
const localSettingsExists = () => { | ||
try { | ||
fs.accessSync(LOCAL_SETTINGS_FILE_PATH); | ||
} catch (err) { | ||
return false; | ||
} | ||
return true; | ||
}; | ||
|
||
const SETTINGS = require(DEFAULT_SETTINGS_FILE_PATH); | ||
|
||
if (localSettingsExists()) { | ||
const LOCAL_SETTINGS = require(LOCAL_SETTINGS_FILE_PATH); | ||
_.mergeWith(SETTINGS, LOCAL_SETTINGS, (a, b) => (_.isArray(b) ? b : undefined)); | ||
} | ||
|
||
const config = SETTINGS; | ||
|
||
module.exports = config; |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters