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

Fixed meshcore.js on Linux with no X, translation fixes.

This commit is contained in:
Ylian Saint-Hilaire 2020-01-18 12:48:25 -08:00
parent 9d85038c70
commit bba881cf27
6 changed files with 1027 additions and 902 deletions

View file

@ -1191,14 +1191,14 @@ function createMeshCore(agent) {
var bash = fs.existsSync('/bin/bash') ? '/bin/bash' : false;
var sh = fs.existsSync('/bin/sh') ? '/bin/sh' : false;
var script = false;
if (require('linux-gnome-helpers').scriptVersion)
{
if (require('linux-gnome-helpers').scriptVersion.major > 2 ||
(require('linux-gnome-helpers').scriptVersion.major == 2 && require('linux-gnome-helpers').scriptVersion.minor >= 25))
{
script = '/usr/bin/script';
try {
if (require('linux-gnome-helpers').scriptVersion) {
if (require('linux-gnome-helpers').scriptVersion.major > 2 ||
(require('linux-gnome-helpers').scriptVersion.major == 2 && require('linux-gnome-helpers').scriptVersion.minor >= 25)) {
script = '/usr/bin/script';
}
}
}
} catch (ex) { }
var python = fs.existsSync('/usr/bin/python') ? '/usr/bin/python' : false;
var shell = bash || sh;