mirror of
https://github.com/Ylianst/MeshCentral.git
synced 2025-03-09 15:40:18 +00:00
show server config for admins
Signed-off-by: Simon Smith <simonsmith5521@gmail.com>
This commit is contained in:
parent
2d8c3cfc64
commit
eb8df307ec
2 changed files with 30 additions and 0 deletions
|
@ -5292,6 +5292,7 @@ module.exports.CreateMeshUser = function (parent, db, ws, req, args, domain, use
|
|||
'serverclearerrorlog': serverCommandServerClearErrorLog,
|
||||
'serverconsole': serverCommandServerConsole,
|
||||
'servererrors': serverCommandServerErrors,
|
||||
'serverconfig': serverCommandServerConfig,
|
||||
'serverstats': serverCommandServerStats,
|
||||
'servertimelinestats': serverCommandServerTimelineStats,
|
||||
'serverupdate': serverCommandServerUpdate,
|
||||
|
@ -6504,6 +6505,13 @@ module.exports.CreateMeshUser = function (parent, db, ws, req, args, domain, use
|
|||
fs.readFile(parent.parent.getConfigFilePath('mesherrors.txt'), 'utf8', function (err, data) { obj.send({ action: 'servererrors', data: data }); });
|
||||
}
|
||||
|
||||
function serverCommandServerConfig(command) {
|
||||
// Load the server config
|
||||
var configFilePath = common.joinPath(parent.parent.datapath, (parent.parent.args.configfile ? parent.parent.args.configfile : 'config.json'));
|
||||
if (userHasSiteUpdate())
|
||||
fs.readFile(configFilePath, 'utf8', function (err, data) { obj.send({ action: 'serverconfig', data: data }); });
|
||||
}
|
||||
|
||||
function serverCommandServerStats(command) {
|
||||
// Only accept if the "My Server" tab is allowed for this domain
|
||||
if (domain.myserver === false) return;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue