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

New agents on all platforms and added clipboard support.

This commit is contained in:
Ylian Saint-Hilaire 2019-03-15 13:55:53 -07:00
parent a4756d572d
commit 21699caa71
100 changed files with 33 additions and 19965 deletions

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View file

@ -462,14 +462,29 @@ function createMeshCore(agent) {
case 'getclip': {
// Send the load clipboard back to the user
sendConsoleText('getClip: ' + JSON.stringify(data));
require("clipboard").read().then(function (str) { mesh.SendCommand({ "action": "msg", "type": "getclip", "sessionid": data.sessionid, "data": str }); });
if (require('MeshAgent').isService)
{
require('clipboard').dispatchRead().then(function (str) { mesh.SendCommand({ "action": "msg", "type": "getclip", "sessionid": data.sessionid, "data": str }); });
}
else
{
require("clipboard").read().then(function (str) { mesh.SendCommand({ "action": "msg", "type": "getclip", "sessionid": data.sessionid, "data": str }); });
}
break;
}
case 'setclip': {
// Set the load clipboard to a user value
sendConsoleText('setClip: ' + JSON.stringify(data));
if (typeof data.data == 'string') {
require("clipboard")(data.data); // Set the clipboard
if (typeof data.data == 'string')
{
if (require('MeshAgent').isService)
{
require('clipboard').dispatchWrite(data.data);
}
else
{
require("clipboard")(data.data); // Set the clipboard
}
mesh.SendCommand({ "action": "msg", "type": "setclip", "sessionid": data.sessionid, "success": true });
}
break;

File diff suppressed because one or more lines are too long

View file

@ -146,16 +146,16 @@ DownloadAgent() {
update-rc.d meshagent defaults
service meshagent start
echo 'meshagent installed as init.d service.'
echo 'To start service: sudo service meshagent start'
echo 'To start service: sudo service meshagent start'
echo 'To stop service: sudo service meshagent stop'
elif [ $starttype -eq 2 ]
then
# upstart
# upstart
echo -e "start on runlevel [2345]\nstop on runlevel [016]\n\nrespawn\n\nchdir /usr/local/mesh\nexec /usr/local/mesh/meshagent\n\n" > /etc/init/meshagent.conf
service meshagent start
echo 'meshagent installed as upstart/init.d service.'
echo 'To start service: sudo service meshagent start'
echo 'To stop service: sudo service meshagent stop'
echo 'To start service: sudo initctl start meshagent'
echo 'To stop service: sudo initctl stop meshagent'
else
# unknown
echo "Unknown Service Platform Type. (ie: init, systemd, etc)"