mirror of
https://github.com/Ylianst/MeshCentral.git
synced 2025-04-07 13:15:33 -04:00
config.json read fixes.
This commit is contained in:
parent
0ee671ac74
commit
62f52e91c7
@ -4020,16 +4020,16 @@ function mainStart() {
|
|||||||
if (args.translate) { modules.push('jsdom'); modules.push('esprima'); modules.push('minify-js'); modules.push('html-minifier'); } // Translation support
|
if (args.translate) { modules.push('jsdom'); modules.push('esprima'); modules.push('minify-js'); modules.push('html-minifier'); } // Translation support
|
||||||
if (typeof config.settings.crowdsec == 'object') { modules.push('@crowdsec/express-bouncer'); } // Add CrowdSec bounser module (https://www.npmjs.com/package/@crowdsec/express-bouncer)
|
if (typeof config.settings.crowdsec == 'object') { modules.push('@crowdsec/express-bouncer'); } // Add CrowdSec bounser module (https://www.npmjs.com/package/@crowdsec/express-bouncer)
|
||||||
|
|
||||||
|
if (typeof config.settings.autobackup == 'object') {
|
||||||
// Setup encrypted zip support if needed
|
// Setup encrypted zip support if needed
|
||||||
if (config.settings.autobackup && config.settings.autobackup.zippassword) {
|
if (config.settings.autobackup.zippassword) { modules.push('archiver-zip-encrypted'); }
|
||||||
modules.push('archiver-zip-encrypted');
|
|
||||||
}
|
|
||||||
// Enable Google Drive Support
|
// Enable Google Drive Support
|
||||||
if (typeof config.settings.autobackup.googledrive == 'object') { modules.push('googleapis'); }
|
if (typeof config.settings.autobackup.googledrive == 'object') { modules.push('googleapis'); }
|
||||||
// Enable WebDAV Support
|
// Enable WebDAV Support
|
||||||
if (typeof config.settings.autobackup.webdav == 'object') {
|
if (typeof config.settings.autobackup.webdav == 'object') {
|
||||||
if ((typeof config.settings.autobackup.webdav.url != 'string') || (typeof config.settings.autobackup.webdav.username != 'string') || (typeof config.settings.autobackup.webdav.password != 'string')) { addServerWarning("Missing WebDAV parameters.", 2, null, !args.launch); } else { modules.push('webdav@4.11.3'); }
|
if ((typeof config.settings.autobackup.webdav.url != 'string') || (typeof config.settings.autobackup.webdav.username != 'string') || (typeof config.settings.autobackup.webdav.password != 'string')) { addServerWarning("Missing WebDAV parameters.", 2, null, !args.launch); } else { modules.push('webdav@4.11.3'); }
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// Setup common password blocking
|
// Setup common password blocking
|
||||||
if (wildleek == true) { modules.push('wildleek@2.0.0'); }
|
if (wildleek == true) { modules.push('wildleek@2.0.0'); }
|
||||||
|
@ -245,7 +245,7 @@ module.exports.CreateServer = function (parent) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Pushover client setup (https://pushover.net)
|
// Pushover client setup (https://pushover.net)
|
||||||
if (parent.config.messaging.pushover) {
|
if (typeof parent.config.messaging.pushover == 'object') {
|
||||||
// Validate Pushover configuration values
|
// Validate Pushover configuration values
|
||||||
var pushoverOK = true;
|
var pushoverOK = true;
|
||||||
if (typeof parent.config.messaging.pushover.token != 'string') { console.log('Invalid or missing Pushover token.'); pushoverOK = false; }
|
if (typeof parent.config.messaging.pushover.token != 'string') { console.log('Invalid or missing Pushover token.'); pushoverOK = false; }
|
||||||
|
11
package.json
11
package.json
@ -37,6 +37,7 @@
|
|||||||
"sample-config-advanced.json"
|
"sample-config-advanced.json"
|
||||||
],
|
],
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
|
"@yetzt/nedb": "^1.8.0",
|
||||||
"archiver": "^5.3.2",
|
"archiver": "^5.3.2",
|
||||||
"body-parser": "^1.19.0",
|
"body-parser": "^1.19.0",
|
||||||
"cbor": "~5.2.0",
|
"cbor": "~5.2.0",
|
||||||
@ -46,13 +47,19 @@
|
|||||||
"express-handlebars": "^5.3.5",
|
"express-handlebars": "^5.3.5",
|
||||||
"express-ws": "^4.0.0",
|
"express-ws": "^4.0.0",
|
||||||
"ipcheck": "^0.1.0",
|
"ipcheck": "^0.1.0",
|
||||||
|
"ldapauth-fork": "^5.0.5",
|
||||||
|
"loadavg-windows": "^1.1.1",
|
||||||
"minimist": "^1.2.5",
|
"minimist": "^1.2.5",
|
||||||
"multiparty": "^4.2.1",
|
"multiparty": "^4.2.1",
|
||||||
"@yetzt/nedb": "^1.8.0",
|
|
||||||
"node-forge": "^1.0.0",
|
"node-forge": "^1.0.0",
|
||||||
|
"node-pushover": "^1.0.0",
|
||||||
|
"node-windows": "^0.1.14",
|
||||||
|
"otplib": "^10.2.3",
|
||||||
|
"ssh2": "^1.14.0",
|
||||||
"ua-parser-js": "^1.0.35",
|
"ua-parser-js": "^1.0.35",
|
||||||
"ws": "^5.2.3",
|
"ws": "^5.2.3",
|
||||||
"yauzl": "^2.10.0"
|
"yauzl": "^2.10.0",
|
||||||
|
"zulip": "^0.1.0"
|
||||||
},
|
},
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": ">=10.0.0"
|
"node": ">=10.0.0"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user