1
0
Fork 0
mirror of https://github.com/Ylianst/MeshCentral.git synced 2025-02-12 11:01:52 +00:00

Syntax fixes.

This commit is contained in:
Ylian Saint-Hilaire 2020-11-05 02:29:13 -08:00
parent 98b39000eb
commit 24c68c8f57

View file

@ -2107,7 +2107,7 @@ function CreateMeshCentralServer(config, args) {
obj.meshToolsBinaries[this.toolname].hashx = this.hashx; obj.meshToolsBinaries[this.toolname].hashx = this.hashx;
obj.meshToolsBinaries[this.toolname].path = this.agentpath; obj.meshToolsBinaries[this.toolname].path = this.agentpath;
obj.meshToolsBinaries[this.toolname].dlname = this.dlname; obj.meshToolsBinaries[this.toolname].dlname = this.dlname;
obj.meshToolsBinaries[this.toolname].url = ('https://' + obj.certificates.CommonName + ':' + ((typeof obj.args.aliasport == 'number') ? obj.args.aliasport : obj.args.port) + '/meshagents?meshaction=' + this.dlname; obj.meshToolsBinaries[this.toolname].url = 'https://' + obj.certificates.CommonName + ':' + ((typeof obj.args.aliasport == 'number') ? obj.args.aliasport : obj.args.port) + '/meshagents?meshaction=' + this.dlname;
var stats = null; var stats = null;
try { stats = obj.fs.statSync(this.agentpath); } catch (e) { } try { stats = obj.fs.statSync(this.agentpath); } catch (e) { }
if (stats != null) { obj.meshToolsBinaries[this.toolname].size = stats.size; } if (stats != null) { obj.meshToolsBinaries[this.toolname].size = stats.size; }
@ -2148,7 +2148,7 @@ function CreateMeshCentralServer(config, args) {
obj.meshAgentInstallScripts[this.info.id].hash = this.hash.digest('hex'); obj.meshAgentInstallScripts[this.info.id].hash = this.hash.digest('hex');
obj.meshAgentInstallScripts[this.info.id].path = this.agentpath; obj.meshAgentInstallScripts[this.info.id].path = this.agentpath;
obj.meshAgentInstallScripts[this.info.id].data = this.xdata; obj.meshAgentInstallScripts[this.info.id].data = this.xdata;
obj.meshAgentInstallScripts[this.info.id].url = ('https://' + obj.certificates.CommonName + ':' + ((typeof obj.args.aliasport == 'number') ? obj.args.aliasport : obj.args.port) + '/meshagents?script=' + this.info.id; obj.meshAgentInstallScripts[this.info.id].url = 'https://' + obj.certificates.CommonName + ':' + ((typeof obj.args.aliasport == 'number') ? obj.args.aliasport : obj.args.port) + '/meshagents?script=' + this.info.id;
var stats = null; var stats = null;
try { stats = obj.fs.statSync(this.agentpath); } catch (e) { } try { stats = obj.fs.statSync(this.agentpath); } catch (e) { }
if (stats != null) { obj.meshAgentInstallScripts[this.info.id].size = stats.size; } if (stats != null) { obj.meshAgentInstallScripts[this.info.id].size = stats.size; }
@ -2213,7 +2213,7 @@ function CreateMeshCentralServer(config, args) {
archcount++; archcount++;
obj.meshAgentBinaries[archid] = Object.assign({}, obj.meshAgentsArchitectureNumbers[archid]); obj.meshAgentBinaries[archid] = Object.assign({}, obj.meshAgentsArchitectureNumbers[archid]);
obj.meshAgentBinaries[archid].path = agentpath; obj.meshAgentBinaries[archid].path = agentpath;
obj.meshAgentBinaries[archid].url = ('http://' + obj.certificates.CommonName + ':' + ((typeof obj.args.aliasport == 'number') ? obj.args.aliasport : obj.args.port) + '/meshagents?id=' + archid; obj.meshAgentBinaries[archid].url = 'http://' + obj.certificates.CommonName + ':' + ((typeof obj.args.aliasport == 'number') ? obj.args.aliasport : obj.args.port) + '/meshagents?id=' + archid;
obj.meshAgentBinaries[archid].size = stats.size; obj.meshAgentBinaries[archid].size = stats.size;
// If this is a windows binary, pull binary information // If this is a windows binary, pull binary information