From 6c3497848874d1f378264b7e155fe2359198fdfc Mon Sep 17 00:00:00 2001 From: Bryan Roe Date: Thu, 22 Sep 2022 12:46:00 -0700 Subject: [PATCH] Fixed bug where custom MSH fields specified by server were not picked up by installer --- agents/meshinstall-linux.js | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/agents/meshinstall-linux.js b/agents/meshinstall-linux.js index 1ad8e5cc..403d3744 100644 --- a/agents/meshinstall-linux.js +++ b/agents/meshinstall-linux.js @@ -103,14 +103,13 @@ if (msh.agentName) { connectArgs.push('--agentName="' + msh.agentName + '"'); } function _install(parms) { + var i; var mstr = require('fs').createWriteStream(process.execPath + '.msh', { flags: 'wb' }); - mstr.write('MeshName=' + msh.MeshName + '\n'); - mstr.write('MeshType=' + msh.MeshType + '\n'); - mstr.write('MeshID=' + msh.MeshID + '\n'); - mstr.write('ServerID=' + msh.ServerID + '\n'); - mstr.write('MeshServer=' + msh.MeshServer + '\n'); - if (msh.agentName) { mstr.write('agentName=' + msh.agentName + '\n'); } - if (msh.meshServiceName) { mstr.write('meshServiceName=' + msh.meshServiceName + '\n'); } + + for (i in msh) + { + mstr.write(i + '=' + msh[i] + '\n'); + } mstr.end(); if (parms == null) { parms = []; }