1
0
Fork 0
mirror of https://github.com/Ylianst/MeshCentral.git synced 2025-03-09 15:40:18 +00:00

All new mesh agents.

This commit is contained in:
Ylian Saint-Hilaire 2021-01-18 16:07:56 -08:00
parent e1804bce97
commit 7a0f18ddee
30 changed files with 42 additions and 27 deletions

View file

@ -1163,7 +1163,9 @@ module.exports.CreateMeshAgent = function (parent, db, ws, req, args, domain) {
// Agent update. The recovery core was loaded in the agent, send a command to update the agent
obj.agentCoreUpdateTaskId = taskid;
var cmd = { action: 'agentupdate', url: obj.agentExeInfo.url, hash: obj.agentExeInfo.hashhex };
var url = obj.agentExeInfo.url;
if (url.startsWith('http://')) { url = url.replace('http://', 'https://') }
var cmd = { action: 'agentupdate', url: url, hash: obj.agentExeInfo.hashhex };
// Add the hash
if (obj.agentExeInfo.fileHash != null) { cmd.hash = obj.agentExeInfo.fileHashHex; } else { cmd.hash = obj.agentExeInfo.hashhex; }
@ -1476,7 +1478,9 @@ module.exports.CreateMeshAgent = function (parent, db, ws, req, args, domain) {
// Agent is requesting an agent update
obj.agentCoreUpdateTaskId = taskid;
var cmd = { action: 'agentupdate', url: obj.agentExeInfo.url, hash: obj.agentExeInfo.hashhex, sessionid: agentUpdateFunc.sessionid };
var url = obj.agentExeInfo.url;
if (url.startsWith('http://')) { url = url.replace('http://', 'https://') }
var cmd = { action: 'agentupdate', url: url, hash: obj.agentExeInfo.hashhex, sessionid: agentUpdateFunc.sessionid };
// Add the hash
if (obj.agentExeInfo.fileHash != null) { cmd.hash = obj.agentExeInfo.fileHashHex; } else { cmd.hash = obj.agentExeInfo.hashhex; }