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

more Linux install script fixes.

This commit is contained in:
Ylian Saint-Hilaire 2019-03-01 18:07:38 -08:00
parent 67eb89143d
commit 9319e6ed43
4 changed files with 90 additions and 91 deletions

View file

@ -1275,8 +1275,8 @@ function CreateMeshCentralServer(config, args) {
// List of possible mesh agent install scripts
var meshAgentsInstallScriptList = {
1: { id: 1, localname: 'meshinstall-linux.sh', rname: 'meshinstall.sh' },
2: { id: 2, localname: 'meshinstall-initd.sh', rname: 'meshagent' }
1: { id: 1, localname: 'meshinstall-linux.sh', rname: 'meshinstall.sh', linux: true },
2: { id: 2, localname: 'meshinstall-initd.sh', rname: 'meshagent', linux: true }
};
// Update the list of available mesh agents
@ -1302,6 +1302,9 @@ function CreateMeshCentralServer(config, args) {
var stats = null;
try { stats = obj.fs.statSync(this.agentpath); } catch (e) { }
if (stats != null) { obj.meshAgentInstallScripts[this.info.id].size = stats.size; }
// Place Unit line breaks on Linux scripts if not already present.
if (obj.meshAgentInstallScripts[this.info.id].linux === true) { obj.meshAgentInstallScripts[this.info.id].data = obj.meshAgentInstallScripts[this.info.id].data.split('\r\n').join('\n') }
});
stream.info = meshAgentsInstallScriptList[scriptid];
stream.agentpath = scriptpath;