mirror of
https://github.com/Ylianst/MeshCentral.git
synced 2024-12-27 15:45:53 -05:00
Updated terminal, so script command is only used on linux, as the script command on MacOS and FreeBSD does not support the required featureset.
This commit is contained in:
parent
222ec88844
commit
74e2529655
@ -1211,9 +1211,9 @@ function createMeshCore(agent) {
|
|||||||
var setupcommands = " alias ls='ls --color=auto'\n";
|
var setupcommands = " alias ls='ls --color=auto'\n";
|
||||||
if (shell == sh) setupcommands += "stty erase ^H\n"
|
if (shell == sh) setupcommands += "stty erase ^H\n"
|
||||||
|
|
||||||
if (script && shell) {
|
if (script && shell && process.platform == 'linux') {
|
||||||
this.httprequest.process = childProcess.execFile(script, ['script', '--return', '--quiet', '-c', '"' + shell + '"', '/dev/null'], options); // Start as active user
|
this.httprequest.process = childProcess.execFile(script, ['script', '--return', '--quiet', '-c', '"' + shell + '"', '/dev/null'], options); // Start as active user
|
||||||
if (process.platform == 'linux') { this.httprequest.process.stdin.write(setupcommands); }
|
this.httprequest.process.stdin.write(setupcommands);
|
||||||
} else if (python && shell) {
|
} else if (python && shell) {
|
||||||
this.httprequest.process = childProcess.execFile(python, ['python', '-c', 'import pty; pty.spawn(["' + shell + '"])'], options); // Start as active user
|
this.httprequest.process = childProcess.execFile(python, ['python', '-c', 'import pty; pty.spawn(["' + shell + '"])'], options); // Start as active user
|
||||||
if (process.platform == 'linux') { this.httprequest.process.stdin.write(setupcommands); }
|
if (process.platform == 'linux') { this.httprequest.process.stdin.write(setupcommands); }
|
||||||
|
Loading…
Reference in New Issue
Block a user