From 1815c9dccf5bdf12224227bf705100e969068946 Mon Sep 17 00:00:00 2001 From: Andras Bacsai Date: Thu, 19 Sep 2024 16:35:10 +0200 Subject: [PATCH] fix: store original root key in the original location --- ..._16_170001_populate_ssh_keys_and_clear_mux_directory.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/database/migrations/2024_09_16_170001_populate_ssh_keys_and_clear_mux_directory.php b/database/migrations/2024_09_16_170001_populate_ssh_keys_and_clear_mux_directory.php index 944b00e13..6b5d09fd8 100644 --- a/database/migrations/2024_09_16_170001_populate_ssh_keys_and_clear_mux_directory.php +++ b/database/migrations/2024_09_16_170001_populate_ssh_keys_and_clear_mux_directory.php @@ -1,8 +1,8 @@ deleteDirectory(''); Storage::disk('ssh-mux')->makeDirectory(''); - PrivateKey::chunk(100, function ($keys) { foreach ($keys as $key) { $key->storeInFileSystem(); + if ($key->id === 0) { + Storage::disk('ssh-keys')->put('id.root@host.docker.internal', $key->private_key); + } } }); }