Update Terminal.php

This commit is contained in:
Bozhidar 2024-04-29 12:53:18 +03:00
parent 4f75c8d511
commit c75cf6f1eb

View file

@ -59,7 +59,10 @@ class Terminal extends Page
}
}
if ($runNewTerminal) {
// $exec = shell_exec('node /usr/local/phyre/web/Modules/Terminal/nodejs/terminal/server.js >> /usr/local/phyre/web/storage/logs/terminal/server-terminal.log &');
if (!is_dir('/usr/local/phyre/web/Modules/Terminal/nodejs/terminal/node_modules')) {
$exec = shell_exec('cd /usr/local/phyre/web/Modules/Terminal/nodejs/terminal && npm install');
}
$exec = shell_exec('node /usr/local/phyre/web/Modules/Terminal/nodejs/terminal/server.js >> /usr/local/phyre/web/storage/logs/terminal/server-terminal.log &');
}
return [