mirror of
https://github.com/Ylianst/MeshCentral.git
synced 2025-03-09 15:40:18 +00:00
Fixed meshcore agent update when used with AgentPort.
This commit is contained in:
parent
a9987c5bff
commit
6f6040d742
4 changed files with 53 additions and 71 deletions
|
@ -1171,8 +1171,7 @@ 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 url = obj.agentExeInfo.url;
|
||||
if (url.startsWith('http://')) { url = url.replace('http://', 'https://') }
|
||||
const url = '*' + require('url').parse(obj.agentExeInfo.url).path;
|
||||
var cmd = { action: 'agentupdate', url: url, hash: obj.agentExeInfo.hashhex };
|
||||
|
||||
// Add the hash
|
||||
|
@ -1483,8 +1482,7 @@ module.exports.CreateMeshAgent = function (parent, db, ws, req, args, domain) {
|
|||
|
||||
// Agent is requesting an agent update
|
||||
obj.agentCoreUpdateTaskId = taskid;
|
||||
var url = obj.agentExeInfo.url;
|
||||
if (url.startsWith('http://')) { url = url.replace('http://', 'https://') }
|
||||
const url = '*' + require('url').parse(obj.agentExeInfo.url).path;
|
||||
var cmd = { action: 'agentupdate', url: url, hash: obj.agentExeInfo.hashhex, sessionid: agentUpdateFunc.sessionid };
|
||||
|
||||
// Add the hash
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue