mirror of
https://github.com/Ylianst/MeshCentral.git
synced 2024-12-22 21:31:35 +03:00
Meshctrl.js improvement to find config.json
This commit is contained in:
parent
2adf15d5e8
commit
442a3029a3
@ -445,9 +445,10 @@ function performConfigOperations(args) {
|
||||
var configChange = false;
|
||||
var fs = require('fs');
|
||||
var path = require('path');
|
||||
var configFile = path.join(__dirname, 'config.json');
|
||||
var configFile = 'config.json';
|
||||
var didSomething = 0;
|
||||
if (fs.existsSync(configFile) == false) { configFile = path.join('meshcentral-data', 'config.json'); }
|
||||
if (fs.existsSync(configFile) == false) { configFile = path.join(__dirname, 'config.json'); }
|
||||
if (fs.existsSync(configFile) == false) { configFile = path.join(__dirname, 'meshcentral-data', 'config.json'); }
|
||||
if (fs.existsSync(configFile) == false) { configFile = path.join(__dirname, '..', 'meshcentral-data', 'config.json'); }
|
||||
if (fs.existsSync(configFile) == false) { console.log("Unable to find config.json."); return; }
|
||||
|
Loading…
Reference in New Issue
Block a user