mirror of
https://github.com/Ylianst/MeshCentral.git
synced 2025-11-07 04:42:54 -05:00
Stability improvements.
This commit is contained in:
Binary file not shown.
Binary file not shown.
File diff suppressed because one or more lines are too long
@@ -660,17 +660,10 @@ function createMeshCore(agent) {
|
||||
while (sendNextBlock > 0) {
|
||||
sendNextBlock--;
|
||||
var buf = new Buffer(4096);
|
||||
buf.writeInt32BE(0x01020304, 0);
|
||||
var len = fs.readSync(this.filedownload.f, buf, 4, 4092, null);
|
||||
this.filedownload.ptr += len;
|
||||
if (len > 0) {
|
||||
this.write(buf.slice(0, len + 4)); // Write as binary
|
||||
} else {
|
||||
fs.closeSync(this.filedownload.f);
|
||||
this.write({ action: 'download', sub: 'done', id: this.filedownload.id });
|
||||
delete this.filedownload;
|
||||
sendNextBlock = 0;
|
||||
}
|
||||
if (len < 4092) { buf.writeInt32BE(0x01000001, 0); fs.closeSync(this.filedownload.f); delete this.filedownload; sendNextBlock = 0; } else { buf.writeInt32BE(0x01000000, 0); }
|
||||
this.write(buf.slice(0, len + 4)); // Write as binary
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -107,7 +107,7 @@ DownloadAgent() {
|
||||
# initd
|
||||
wget $url/meshagents?script=2 -q --no-check-certificate -O /etc/init.d/meshagent
|
||||
chmod +x /etc/init.d/meshagent
|
||||
update-rc.d meshagent default # creates symlinks for rc.d
|
||||
update-rc.d meshagent defaults # creates symlinks for rc.d
|
||||
service meshagent start
|
||||
else
|
||||
# upstart / others (???)
|
||||
|
||||
Reference in New Issue
Block a user