From c6b4c38d8f8f5ac5252b8636a0a6241b7f9fb076 Mon Sep 17 00:00:00 2001 From: Bozhidar Slaveykov Date: Sun, 7 Apr 2024 14:34:48 +0300 Subject: [PATCH] Update PhyreServer.php --- web/app/Models/PhyreServer.php | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/web/app/Models/PhyreServer.php b/web/app/Models/PhyreServer.php index 3262207..fa4509c 100644 --- a/web/app/Models/PhyreServer.php +++ b/web/app/Models/PhyreServer.php @@ -97,11 +97,17 @@ class PhyreServer extends Model $ssh = new SSH2($this->ip); if ($ssh->login($this->username, $this->password)) { - $output = $ssh->exec('rm -rf /usr/local/phyre/update/update-web-panel.sh'); - $output = $ssh->exec('cd /usr/local/phyre/update && wget https://raw.githubusercontent.com/CloudVisionApps/PhyrePanel/main/update/update-web-panel.sh'); - $output = $ssh->exec('chmod +x /usr/local/phyre/update/update-web-panel.sh'); - $output = $ssh->exec('cd /usr/local/phyre/update && ./update-web-panel.sh'); + $output = $ssh->exec('cd /usr/local/phyre/web && /usr/local/phyre/php/bin/php artisan apache:ping-websites-with-curl'); + dd($output); + $output = ''; + $output .= $ssh->exec('wget https://raw.githubusercontent.com/CloudVisionApps/PhyrePanel/main/update/update-web-panel.sh -O /usr/local/phyre/update/update-web-panel.sh'); + $output .= $ssh->exec('chmod +x /usr/local/phyre/update/update-web-panel.sh'); + $output .= $ssh->exec('/usr/local/phyre/update/update-web-panel.sh'); + + dd($output); + + $this->healthCheck(); } }