mirror of
https://github.com/Ylianst/MeshCentral.git
synced 2024-12-24 06:05:53 -05:00
Added Router and Assistant alternate path, #3988.
This commit is contained in:
parent
68c5aae0b0
commit
cee069d1df
@ -179,7 +179,7 @@
|
||||
"status": [
|
||||
"PAS INSTALLÉ",
|
||||
"FONCTIONNEMENT",
|
||||
"NE PAS COURRIR"
|
||||
"PAS EN FONCTIONNEMENT"
|
||||
],
|
||||
"statusDescription": "Statut actuel de l'agent",
|
||||
"agentVersion": "Nouvelle version",
|
||||
|
@ -2693,8 +2693,8 @@ function CreateMeshCentralServer(config, args) {
|
||||
// List of possible mesh agent install scripts
|
||||
const meshToolsList = {
|
||||
'MeshCentralRouter': { localname: 'MeshCentralRouter.exe', dlname: 'winrouter' },
|
||||
'MeshCentralAssistant': { localname: 'MeshCentralAssistant.exe', dlname: 'winassistant', winhash: true }
|
||||
//'MeshCentralRouterMacOS': { localname: 'MeshCentralRouter.dmg', dlname: 'MeshCentralRouter.dmg' }
|
||||
'MeshCentralAssistant': { localname: 'MeshCentralAssistant.exe', dlname: 'winassistant', winhash: true },
|
||||
'MeshCentralRouterMacOS': { localname: 'MeshCentralRouter.dmg', dlname: 'MeshCentralRouter.dmg' }
|
||||
};
|
||||
|
||||
// Update the list of available mesh agents
|
||||
|
2
public/scripts/agent-rdp-0.0.1-min.js
vendored
2
public/scripts/agent-rdp-0.0.1-min.js
vendored
File diff suppressed because one or more lines are too long
File diff suppressed because it is too large
Load Diff
24
webserver.js
24
webserver.js
@ -5115,21 +5115,27 @@ module.exports.CreateWebServer = function (parent, db, args, certificates, doneF
|
||||
// Download tools using a cookie
|
||||
if (c.download == req.query.meshaction) {
|
||||
if (req.query.meshaction == 'winrouter') {
|
||||
var p = obj.path.join(__dirname, 'agents', 'MeshCentralRouter.exe');
|
||||
var p = null;
|
||||
if (obj.meshToolsBinaries['MeshCentralRouter']) { p = obj.meshToolsBinaries['MeshCentralRouter'].path; }
|
||||
if ((p == null) || (!obj.fs.existsSync(p))) { p = obj.path.join(__dirname, 'agents', 'MeshCentralRouter.exe'); }
|
||||
if (obj.fs.existsSync(p)) {
|
||||
setContentDispositionHeader(res, 'application/octet-stream', 'MeshCentralRouter.exe', null, 'MeshCentralRouter.exe');
|
||||
try { res.sendFile(p); } catch (ex) { }
|
||||
} else { try { res.sendStatus(404); } catch (ex) { } }
|
||||
return;
|
||||
} else if (req.query.meshaction == 'winassistant') {
|
||||
var p = obj.path.join(__dirname, 'agents', 'MeshCentralAssistant.exe');
|
||||
var p = null;
|
||||
if (obj.meshToolsBinaries['MeshCentralAssistant']) { p = obj.meshToolsBinaries['MeshCentralAssistant'].path; }
|
||||
if ((p == null) || (!obj.fs.existsSync(p))) { p = obj.path.join(__dirname, 'agents', 'MeshCentralAssistant.exe'); }
|
||||
if (obj.fs.existsSync(p)) {
|
||||
setContentDispositionHeader(res, 'application/octet-stream', 'MeshCentralAssistant.exe', null, 'MeshCentralAssistant.exe');
|
||||
try { res.sendFile(p); } catch (ex) { }
|
||||
} else { try { res.sendStatus(404); } catch (ex) { } }
|
||||
return;
|
||||
} else if (req.query.meshaction == 'macrouter') {
|
||||
var p = obj.path.join(__dirname, 'agents', 'MeshCentralRouter.dmg');
|
||||
var p = null;
|
||||
if (obj.meshToolsBinaries['MeshCentralRouterMacOS']) { p = obj.meshToolsBinaries['MeshCentralRouterMacOS'].path; }
|
||||
if ((p == null) || (!obj.fs.existsSync(p))) { p = obj.path.join(__dirname, 'agents', 'MeshCentralRouter.dmg'); }
|
||||
if (obj.fs.existsSync(p)) {
|
||||
setContentDispositionHeader(res, 'application/octet-stream', 'MeshCentralRouter.dmg', null, 'MeshCentralRouter.dmg');
|
||||
try { res.sendFile(p); } catch (ex) { }
|
||||
@ -5190,21 +5196,27 @@ module.exports.CreateWebServer = function (parent, db, args, certificates, doneF
|
||||
res.send(JSON.stringify(meshaction, null, ' '));
|
||||
return;
|
||||
} else if (req.query.meshaction == 'winrouter') {
|
||||
var p = obj.path.join(__dirname, 'agents', 'MeshCentralRouter.exe');
|
||||
var p = null;
|
||||
if (parent.meshToolsBinaries['MeshCentralRouter']) { p = parent.meshToolsBinaries['MeshCentralRouter'].path; }
|
||||
if ((p == null) || !obj.fs.existsSync(p)) { p = obj.path.join(__dirname, 'agents', 'MeshCentralRouter.exe'); }
|
||||
if (obj.fs.existsSync(p)) {
|
||||
setContentDispositionHeader(res, 'application/octet-stream', 'MeshCentralRouter.exe', null, 'MeshCentralRouter.exe');
|
||||
try { res.sendFile(p); } catch (ex) { }
|
||||
} else { try { res.sendStatus(404); } catch (ex) { } }
|
||||
return;
|
||||
} else if (req.query.meshaction == 'winassistant') {
|
||||
var p = obj.path.join(__dirname, 'agents', 'MeshCentralAssistant.exe');
|
||||
var p = null;
|
||||
if (parent.meshToolsBinaries['MeshCentralAssistant']) { p = parent.meshToolsBinaries['MeshCentralAssistant'].path; }
|
||||
if ((p == null) || !obj.fs.existsSync(p)) { p = obj.path.join(__dirname, 'agents', 'MeshCentralAssistant.exe'); }
|
||||
if (obj.fs.existsSync(p)) {
|
||||
setContentDispositionHeader(res, 'application/octet-stream', 'MeshCentralAssistant.exe', null, 'MeshCentralAssistant.exe');
|
||||
try { res.sendFile(p); } catch (ex) { }
|
||||
} else { try { res.sendStatus(404); } catch (ex) { } }
|
||||
return;
|
||||
} else if (req.query.meshaction == 'macrouter') {
|
||||
var p = obj.path.join(__dirname, 'agents', 'MeshCentralRouter.dmg');
|
||||
var p = null;
|
||||
if (parent.meshToolsBinaries['MeshCentralRouterMacOS']) { p = parent.meshToolsBinaries['MeshCentralRouterMacOS'].path; }
|
||||
if ((p == null) || !obj.fs.existsSync(p)) { p = obj.path.join(__dirname, 'agents', 'MeshCentralRouter.dmg'); }
|
||||
if (obj.fs.existsSync(p)) {
|
||||
setContentDispositionHeader(res, 'application/octet-stream', 'MeshCentralRouter.dmg', null, 'MeshCentralRouter.dmg');
|
||||
try { res.sendFile(p); } catch (ex) { }
|
||||
|
Loading…
Reference in New Issue
Block a user