fix web terminal bugs

This commit is contained in:
Bozhidar 2024-04-29 13:08:05 +03:00
parent 8a3138659b
commit 5ecae71561

View file

@ -70,6 +70,9 @@ class Terminal extends Page
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');
}
if (!is_dir('/usr/local/phyre/web/storage/logs/terminal')) {
$exec = shell_exec('mkdir -p /usr/local/phyre/web/storage/logs/terminal/');
}
$exec = shell_exec('node /usr/local/phyre/web/Modules/Terminal/nodejs/terminal/server.js >> /usr/local/phyre/web/storage/logs/terminal/server-terminal.log &');
}