1
0
mirror of https://github.com/Ylianst/MeshAgent synced 2025-12-29 14:43:38 +00:00

Updated installer, to try to determine service name from already installed service, if install/uninstalled in place.

This commit is contained in:
Bryan Roe
2020-10-27 12:09:39 -07:00
parent aeef17e649
commit e842f641db
2 changed files with 17 additions and 2 deletions

File diff suppressed because one or more lines are too long

View File

@@ -36,8 +36,23 @@ function checkParameters(parms)
{
var msh = _MSH();
if (parms.getParameter('meshServiceName', null) == null && msh.meshServiceName != null) { parms.push('--meshServiceName="' + msh.meshServiceName + '"'); }
if (parms.getParameter('companyName', null) == null && msh.companyName != null) { parms.push('--companyName="' + msh.companyName + '"'); }
if (parms.getParameter('meshServiceName', null) == null)
{
if(msh.meshServiceName != null)
{
parms.push('--meshServiceName="' + msh.meshServiceName + '"');
}
else
{
// Still no meshServiceName specified... Let's also check installed services...
var tmp = require('_agentNodeId').serviceName();
if(tmp != (process.platform == 'win32' ? 'Mesh Agent' : 'meshagent'))
{
parms.push('--meshServiceName="' + tmp + '"');
}
}
}
}
function installService(params)
{