diff --git a/web/Modules/Terminal/Filament/Pages/Terminal.php b/web/Modules/Terminal/Filament/Pages/Terminal.php index 4687a4c..5b9eda6 100644 --- a/web/Modules/Terminal/Filament/Pages/Terminal.php +++ b/web/Modules/Terminal/Filament/Pages/Terminal.php @@ -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 [