mirror of
https://github.com/Ylianst/MeshCentral.git
synced 2025-03-09 15:40:18 +00:00
Fixed and improved ACM activation.
This commit is contained in:
parent
f2bebe004d
commit
584dfebf81
6 changed files with 104 additions and 60 deletions
|
@ -1194,9 +1194,20 @@ function configureJsonControl(data) {
|
|||
settings.apftunnel.sendStartTlsHostConfigResponse(response);
|
||||
});
|
||||
break;
|
||||
case 'stopConfiguration': // Request Intel AMT stop configuration.
|
||||
var amtMeiModule, amtMei;
|
||||
try { amtMeiModule = require('amt-mei'); amtMei = new amtMeiModule(); } catch (ex) { settings.apftunnel.sendStartTlsHostConfigResponse({ state: -103 }); break; }
|
||||
amtMei.on('error', function (e) { settings.apftunnel.sendStartTlsHostConfigResponse({ state: -104 }); });
|
||||
amtMei.stopConfiguration(function (status) {
|
||||
settings.apftunnel.sendStopConfigurationResponse(status);
|
||||
});
|
||||
break;
|
||||
case 'close': // Close the CIRA-LMS connection
|
||||
exit(0);
|
||||
break;
|
||||
default:
|
||||
console.log("MeshCmd update may be needed, unknown JSON control action: " + data.action);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -1202,6 +1202,11 @@ function handleServerCommand(data) {
|
|||
apftunnel.sendStartTlsHostConfigResponse(response);
|
||||
});
|
||||
}
|
||||
if (data.action == 'stopConfiguration') { // Request Intel AMT stop configuration.
|
||||
amt.stopConfiguration(function (response) {
|
||||
apftunnel.sendStopConfigurationResponse(response);
|
||||
});
|
||||
}
|
||||
}
|
||||
apftunnel.onChannelClosed = function () { addAmtEvent('LMS tunnel closed.'); apftunnel = null; }
|
||||
try { apftunnel.connect(); } catch (ex) { }
|
||||
|
|
|
@ -184,6 +184,7 @@ function CreateAPFClient(parent, args) {
|
|||
obj.updateMeiState = function (state) { SendJsonControl(obj.forwardClient.ws, { action: 'meiState', value: state }); }
|
||||
obj.sendMeiDeactivationState = function (state) { SendJsonControl(obj.forwardClient.ws, { action: 'deactivate', value: state }); }
|
||||
obj.sendStartTlsHostConfigResponse = function (state) { SendJsonControl(obj.forwardClient.ws, { action: 'startTlsHostConfig', value: state }); }
|
||||
obj.sendStopConfigurationResponse = function (state) { SendJsonControl(obj.forwardClient.ws, { action: 'stopConfiguration', value: state }); }
|
||||
|
||||
function SendJsonControl(socket, o) {
|
||||
var data = JSON.stringify(o)
|
||||
|
|
|
@ -184,6 +184,7 @@ function CreateAPFClient(parent, args) {
|
|||
obj.updateMeiState = function (state) { SendJsonControl(obj.forwardClient.ws, { action: 'meiState', value: state }); }
|
||||
obj.sendMeiDeactivationState = function (state) { SendJsonControl(obj.forwardClient.ws, { action: 'deactivate', value: state }); }
|
||||
obj.sendStartTlsHostConfigResponse = function (state) { SendJsonControl(obj.forwardClient.ws, { action: 'startTlsHostConfig', value: state }); }
|
||||
obj.sendStopConfigurationResponse = function (state) { SendJsonControl(obj.forwardClient.ws, { action: 'stopConfiguration', value: state }); }
|
||||
|
||||
function SendJsonControl(socket, o) {
|
||||
var data = JSON.stringify(o)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue