mirror of
https://github.com/vitodeploy/vito.git
synced 2025-05-10 18:23:35 +00:00
Fix missing ip for AWS and DO (#461)
* Fix missing ip for AWS and DO * Fix Vultr
This commit is contained in:
parent
262c5e040d
commit
dd78c86a60
app
@ -86,6 +86,9 @@ private function install(Server $server): void
|
||||
while ($maxWait > 0) {
|
||||
sleep(10);
|
||||
$maxWait -= 10;
|
||||
if (! $server->provider()->isRunning()) {
|
||||
continue;
|
||||
}
|
||||
try {
|
||||
$server->ssh()->connect();
|
||||
break;
|
||||
|
@ -149,6 +149,10 @@ public function isRunning(): bool
|
||||
$this->server->save();
|
||||
}
|
||||
|
||||
if (! $this->server->ip) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if (isset($result['Reservations'][0]['Instances'][0]['State']) && isset($result['Reservations'][0]['Instances'][0]['State']['Name'])) {
|
||||
$status = $result['Reservations'][0]['Instances'][0]['State']['Name'];
|
||||
if ($status == 'running') {
|
||||
|
@ -176,6 +176,10 @@ public function isRunning(): bool
|
||||
$this->server->save();
|
||||
}
|
||||
|
||||
if (! $this->server->ip) {
|
||||
return false;
|
||||
}
|
||||
|
||||
return $status->json()['droplet']['status'] == 'active';
|
||||
}
|
||||
|
||||
|
@ -171,6 +171,10 @@ public function isRunning(): bool
|
||||
$this->server->save();
|
||||
}
|
||||
|
||||
if (! $this->server->ip) {
|
||||
return false;
|
||||
}
|
||||
|
||||
return $status->json()['instance']['status'] == 'active';
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user