From e8d84b7067d99153cbb5d6a1a89b6d96e93c4c2c Mon Sep 17 00:00:00 2001 From: Andras Bacsai Date: Mon, 15 Jan 2024 19:57:29 +0100 Subject: [PATCH 1/2] Update server and version configurations --- app/Models/Server.php | 2 ++ bootstrap/helpers/remoteProcess.php | 2 +- config/sentry.php | 2 +- config/version.php | 2 +- versions.json | 2 +- 5 files changed, 6 insertions(+), 4 deletions(-) diff --git a/app/Models/Server.php b/app/Models/Server.php index 65b992b5a..2a4bfe63f 100644 --- a/app/Models/Server.php +++ b/app/Models/Server.php @@ -396,12 +396,14 @@ class Server extends BaseModel { $server = Server::find($this->id); if (!$server) { + echo 'Server not found?!'; return false; } if ($server->skipServer()) { return false; } $uptime = instant_remote_process(['uptime'], $server, false); + echo "Uptime: $uptime\n"; if (!$uptime) { $server->settings()->update([ 'is_reachable' => false, diff --git a/bootstrap/helpers/remoteProcess.php b/bootstrap/helpers/remoteProcess.php index da6705e4c..f49c7cafc 100644 --- a/bootstrap/helpers/remoteProcess.php +++ b/bootstrap/helpers/remoteProcess.php @@ -126,7 +126,7 @@ function generateSshCommand(Server $server, string $command, bool $isMux = true) if (data_get($server, 'settings.is_cloudflare_tunnel')) { $ssh_command .= '-o ProxyCommand="/usr/local/bin/cloudflared access ssh --hostname %h" '; } - $command = "test -f ~/.profile && . ~/.profile; PATH=\$PATH:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/host/usr/local/sbin:/host/usr/local/bin:/host/usr/sbin:/host/usr/bin:/host/sbin:/host/bin && $command"; + $command = "PATH=\$PATH:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/host/usr/local/sbin:/host/usr/local/bin:/host/usr/sbin:/host/usr/bin:/host/sbin:/host/bin && $command"; $ssh_command .= "-i {$privateKeyLocation} " . '-o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null ' . '-o PasswordAuthentication=no ' diff --git a/config/sentry.php b/config/sentry.php index 6d4f63ca6..eedf1c992 100644 --- a/config/sentry.php +++ b/config/sentry.php @@ -7,7 +7,7 @@ return [ // The release version of your application // Example with dynamic git hash: trim(exec('git --git-dir ' . base_path('.git') . ' log --pretty="%h" -n1 HEAD')) - 'release' => '4.0.0-beta.195', + 'release' => '4.0.0-beta.196', // When left empty or `null` the Laravel environment will be used 'environment' => config('app.env'), diff --git a/config/version.php b/config/version.php index 5a52e57c6..5aa8bcb7a 100644 --- a/config/version.php +++ b/config/version.php @@ -1,3 +1,3 @@ Date: Mon, 15 Jan 2024 20:22:13 +0100 Subject: [PATCH 2/2] Remove unnecessary echo statements in Server.php --- app/Models/Server.php | 2 -- 1 file changed, 2 deletions(-) diff --git a/app/Models/Server.php b/app/Models/Server.php index 2a4bfe63f..65b992b5a 100644 --- a/app/Models/Server.php +++ b/app/Models/Server.php @@ -396,14 +396,12 @@ class Server extends BaseModel { $server = Server::find($this->id); if (!$server) { - echo 'Server not found?!'; return false; } if ($server->skipServer()) { return false; } $uptime = instant_remote_process(['uptime'], $server, false); - echo "Uptime: $uptime\n"; if (!$uptime) { $server->settings()->update([ 'is_reachable' => false,