From 5ecae71561f84e4ad9ee1eecadc82b513a2af15c Mon Sep 17 00:00:00 2001 From: Bozhidar Date: Mon, 29 Apr 2024 13:08:05 +0300 Subject: [PATCH] fix web terminal bugs --- web/Modules/Terminal/Filament/Pages/Terminal.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/web/Modules/Terminal/Filament/Pages/Terminal.php b/web/Modules/Terminal/Filament/Pages/Terminal.php index 90c3cc3..87ddb8a 100644 --- a/web/Modules/Terminal/Filament/Pages/Terminal.php +++ b/web/Modules/Terminal/Filament/Pages/Terminal.php @@ -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 &'); }