mirror of
https://github.com/Ylianst/MeshCentral.git
synced 2025-03-09 15:40:18 +00:00
More support for agent update using meshcore.
This commit is contained in:
parent
f00e565d8b
commit
82f3a40ba6
22 changed files with 39 additions and 13 deletions
|
@ -287,7 +287,7 @@ function getServerTargetUrlEx(url) {
|
|||
|
||||
require('MeshAgent').on('Connected', function () {
|
||||
require('os').name().then(function (v) {
|
||||
//sendConsoleText("Mesh Agent Receovery Console, OS: " + v);
|
||||
//sendConsoleText("Mesh Agent Recovery Console, OS: " + v);
|
||||
require('MeshAgent').SendCommand(meshCoreObj);
|
||||
});
|
||||
});
|
||||
|
@ -643,12 +643,17 @@ function processConsoleCommand(cmd, args, rights, sessionid) {
|
|||
var response = null;
|
||||
switch (cmd) {
|
||||
case 'help':
|
||||
response = "Available commands are: osinfo, dbkeys, dbget, dbset, dbcompact, netinfo, versions.";
|
||||
response = "Available commands are: osinfo, dbkeys, dbget, dbset, dbcompact, netinfo, versions, agentupdate.";
|
||||
break;
|
||||
case 'versions':
|
||||
response = JSON.stringify(process.versions, null, ' ');
|
||||
break;
|
||||
case 'agentupdate':
|
||||
// Request that the server send a agent update command
|
||||
require('MeshAgent').SendCommand({ action: 'agentupdate' });
|
||||
break;
|
||||
case 'agentupdateex':
|
||||
// Perform an direct agent update without requesting any information from the server, this should not typically be used.
|
||||
agentUpdate_Start(null, { session: sessionid });
|
||||
break;
|
||||
case 'osinfo': { // Return the operating system information
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue