fix: update ProductionSeeder to check for private key instead of server's private key
This commit is contained in:
@@ -88,9 +88,8 @@ class ProductionSeeder extends Seeder
|
|||||||
echo ' Found '.count($ssh_keys_directory)." SSH keys\n";
|
echo ' Found '.count($ssh_keys_directory)." SSH keys\n";
|
||||||
$coolify_key = collect($ssh_keys_directory)->firstWhere(fn ($item) => str($item)->contains($coolify_key_name));
|
$coolify_key = collect($ssh_keys_directory)->firstWhere(fn ($item) => str($item)->contains($coolify_key_name));
|
||||||
|
|
||||||
$server = Server::find(0);
|
$private_key_found = PrivateKey::find(0);
|
||||||
$found = $server->privateKey;
|
if (! $private_key_found) {
|
||||||
if (! $found) {
|
|
||||||
if ($coolify_key) {
|
if ($coolify_key) {
|
||||||
echo " Found Coolify SSH key\n";
|
echo " Found Coolify SSH key\n";
|
||||||
$user = str($coolify_key)->before('@')->after('id.');
|
$user = str($coolify_key)->before('@')->after('id.');
|
||||||
|
|||||||
Reference in New Issue
Block a user