Fixed service console command to use correct service name, on branded agents

This commit is contained in:
Bryan Roe 2020-12-18 15:35:57 -08:00
parent b200d48f56
commit 059e8b4cc4

View File

@ -2811,7 +2811,15 @@ function createMeshCore(agent) {
}
else
{
var s = require('service-manager').manager.getService(process.platform == 'win32' ? 'Mesh Agent' : 'meshagent');
var svcname = process.platform == 'win32' ? 'Mesh Agent' : 'meshagent';
try
{
svcname = require('MeshAgent').serviceName;
}
catch(x)
{
}
var s = require('service-manager').manager.getService(svcname);
switch(args['_'][0].toLowerCase())
{
case 'status':