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

Server partially supports hardware login keys.

This commit is contained in:
Ylian Saint-Hilaire 2019-02-07 20:06:01 -08:00
parent 3910eba2eb
commit 198e949628
47 changed files with 307 additions and 109 deletions

View file

@ -757,6 +757,20 @@ module.exports.CreateMeshAgent = function (parent, db, ws, req, args, domain) {
// Nothing is done right now.
break;
}
case 'getScript':
{
// Used by the agent to get configuration scripts.
if (command.type == 1) {
obj.parent.getCiraConfigurationScript(obj.dbMeshKey, function (script) {
obj.send(JSON.stringify({ action: 'getScript', type: 1, script: script.toString() }));
});
} else if (command.type == 2) {
obj.parent.getCiraCleanupScript(function (script) {
obj.send(JSON.stringify({ action: 'getScript', type: 2, script: script.toString() }));
});
}
break;
}
default: {
console.log('Unknown agent action (' + obj.remoteaddrport + '): ' + command.action + '.');
break;