mirror of
https://github.com/Ylianst/MeshCentral.git
synced 2024-12-27 16:02:16 +03:00
Added temporary agent update option.
This commit is contained in:
parent
9838b52f8a
commit
914d2414b6
@ -1878,6 +1878,8 @@ module.exports.CreateMeshAgent = function (parent, db, ws, req, args, domain) {
|
|||||||
// Check if we need to update this agent, return true if agent binary update required.
|
// Check if we need to update this agent, return true if agent binary update required.
|
||||||
// Return 0 is no update needed, 1 update using native system, 2 update using meshcore system
|
// Return 0 is no update needed, 1 update using native system, 2 update using meshcore system
|
||||||
function compareAgentBinaryHash(agentExeInfo, agentHash) {
|
function compareAgentBinaryHash(agentExeInfo, agentHash) {
|
||||||
|
// If this is a temporary agent and the server is set to not update temporary agents, don't update the agent.
|
||||||
|
if ((obj.agentInfo.capabilities & 0x20) && (args.temporaryagentupdate === false)) return 0;
|
||||||
// If we are testing the agent update system, always return true
|
// If we are testing the agent update system, always return true
|
||||||
if ((args.agentupdatetest === true) || (args.agentupdatetest === 1)) return 1;
|
if ((args.agentupdatetest === true) || (args.agentupdatetest === 1)) return 1;
|
||||||
if (args.agentupdatetest === 2) return 2;
|
if (args.agentupdatetest === 2) return 2;
|
||||||
|
@ -106,6 +106,8 @@
|
|||||||
"compression": { "type": "boolean", "default": true, "description": "Enables GZIP compression for web requests." },
|
"compression": { "type": "boolean", "default": true, "description": "Enables GZIP compression for web requests." },
|
||||||
"wscompression": { "type": "boolean", "default": false, "description": "Enables server-side, websocket per-message deflate compression." },
|
"wscompression": { "type": "boolean", "default": false, "description": "Enables server-side, websocket per-message deflate compression." },
|
||||||
"agentwscompression": { "type": "boolean", "default": true, "description": "Enables agent-side, websocket per-message deflate compression. wscompression must also be true for this to work." },
|
"agentwscompression": { "type": "boolean", "default": true, "description": "Enables agent-side, websocket per-message deflate compression. wscompression must also be true for this to work." },
|
||||||
|
"noagentupdate": { "type": "integer", "default": 0, "description": "Set to 1 to present the server from updating any agent." },
|
||||||
|
"temporaryAgentUpdate": { "type": "boolean", "default": true, "description": "Set to false to not allow temporary agents to be updated." },
|
||||||
"meshErrorLogPath": { "type": "string" },
|
"meshErrorLogPath": { "type": "string" },
|
||||||
"npmPath": { "type": "string" },
|
"npmPath": { "type": "string" },
|
||||||
"npmProxy": { "type": "string", "format": "uri" },
|
"npmProxy": { "type": "string", "format": "uri" },
|
||||||
|
Loading…
Reference in New Issue
Block a user