From d13e2c086541f8e2005ee5c2bc14da49baf419a2 Mon Sep 17 00:00:00 2001 From: peaklabs-dev <122374094+peaklabs-dev@users.noreply.github.com> Date: Tue, 17 Sep 2024 15:57:57 +0200 Subject: [PATCH] Fix: Clear mux directory --- ..._16_170001_populate_ssh_keys_and_clear_mux_directory.php} | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) rename database/migrations/{2024_09_16_170001_populate_ssh_keys_directory.php => 2024_09_16_170001_populate_ssh_keys_and_clear_mux_directory.php} (71%) diff --git a/database/migrations/2024_09_16_170001_populate_ssh_keys_directory.php b/database/migrations/2024_09_16_170001_populate_ssh_keys_and_clear_mux_directory.php similarity index 71% rename from database/migrations/2024_09_16_170001_populate_ssh_keys_directory.php rename to database/migrations/2024_09_16_170001_populate_ssh_keys_and_clear_mux_directory.php index 33a5e695f..944b00e13 100644 --- a/database/migrations/2024_09_16_170001_populate_ssh_keys_directory.php +++ b/database/migrations/2024_09_16_170001_populate_ssh_keys_and_clear_mux_directory.php @@ -4,13 +4,16 @@ use Illuminate\Database\Migrations\Migration; use Illuminate\Support\Facades\Storage; use App\Models\PrivateKey; -class PopulateSshKeysDirectory extends Migration +class PopulateSshKeysAndClearMuxDirectory extends Migration { public function up() { Storage::disk('ssh-keys')->deleteDirectory(''); Storage::disk('ssh-keys')->makeDirectory(''); + Storage::disk('ssh-mux')->deleteDirectory(''); + Storage::disk('ssh-mux')->makeDirectory(''); + PrivateKey::chunk(100, function ($keys) { foreach ($keys as $key) { $key->storeInFileSystem();