mirror of
https://github.com/Ylianst/MeshCentral.git
synced 2025-04-17 01:09:59 -04:00
Updated to check script version on linux, as older versions that 2.25 does not work correctly.
This commit is contained in:
parent
100bf35794
commit
9d85038c70
@ -1190,7 +1190,16 @@ function createMeshCore(agent) {
|
|||||||
try {
|
try {
|
||||||
var bash = fs.existsSync('/bin/bash') ? '/bin/bash' : false;
|
var bash = fs.existsSync('/bin/bash') ? '/bin/bash' : false;
|
||||||
var sh = fs.existsSync('/bin/sh') ? '/bin/sh' : false;
|
var sh = fs.existsSync('/bin/sh') ? '/bin/sh' : false;
|
||||||
var script = fs.existsSync('/usr/bin/script') ? '/usr/bin/script' : 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';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
var python = fs.existsSync('/usr/bin/python') ? '/usr/bin/python' : false;
|
var python = fs.existsSync('/usr/bin/python') ? '/usr/bin/python' : false;
|
||||||
var shell = bash || sh;
|
var shell = bash || sh;
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user