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

Improved internalization.

This commit is contained in:
Ylian Saint-Hilaire 2019-12-23 14:25:27 -08:00
parent 74e2529655
commit 2e81ba0bf9
18 changed files with 1805 additions and 1228 deletions

View file

@ -1211,9 +1211,9 @@ function createMeshCore(agent) {
var setupcommands = " alias ls='ls --color=auto'\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
if (process.platform == 'linux') { this.httprequest.process.stdin.write(setupcommands); }
this.httprequest.process.stdin.write(setupcommands);
} else if (python && shell) {
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); }