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:
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.
|
@ -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;
|
||||
|
|
2
agents/meshcore.min.js
vendored
2
agents/meshcore.min.js
vendored
File diff suppressed because one or more lines are too long
|
@ -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)"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue