fix: ec2 does not have uptime command lol

version++
This commit is contained in:
Andras Bacsai
2024-02-15 13:44:40 +01:00
parent 38d367e709
commit bba1cb3832
6 changed files with 7 additions and 55 deletions

View File

@@ -206,7 +206,8 @@ uZx9iFkCELtxrh31QJ68AAAAEXNhaWxANzZmZjY2ZDJlMmRkAQIDBA==
try {
config()->set('coolify.mux_enabled', false);
instant_remote_process(['uptime'], $this->createdServer, true);
// EC2 does not have `uptime` command, lol
instant_remote_process(['ls'], $this->createdServer, true);
$this->createdServer->settings()->update([
'is_reachable' => true,

View File

@@ -400,7 +400,8 @@ class Server extends BaseModel
if ($server->skipServer()) {
return false;
}
$uptime = instant_remote_process(['uptime'], $server, false);
// EC2 does not have `uptime` command, lol
$uptime = instant_remote_process(['ls'], $server, false);
if (!$uptime) {
$server->settings()->update([
'is_reachable' => false,