Fix: Clear mux directory
This commit is contained in:
@@ -4,13 +4,16 @@ use Illuminate\Database\Migrations\Migration;
|
|||||||
use Illuminate\Support\Facades\Storage;
|
use Illuminate\Support\Facades\Storage;
|
||||||
use App\Models\PrivateKey;
|
use App\Models\PrivateKey;
|
||||||
|
|
||||||
class PopulateSshKeysDirectory extends Migration
|
class PopulateSshKeysAndClearMuxDirectory extends Migration
|
||||||
{
|
{
|
||||||
public function up()
|
public function up()
|
||||||
{
|
{
|
||||||
Storage::disk('ssh-keys')->deleteDirectory('');
|
Storage::disk('ssh-keys')->deleteDirectory('');
|
||||||
Storage::disk('ssh-keys')->makeDirectory('');
|
Storage::disk('ssh-keys')->makeDirectory('');
|
||||||
|
|
||||||
|
Storage::disk('ssh-mux')->deleteDirectory('');
|
||||||
|
Storage::disk('ssh-mux')->makeDirectory('');
|
||||||
|
|
||||||
PrivateKey::chunk(100, function ($keys) {
|
PrivateKey::chunk(100, function ($keys) {
|
||||||
foreach ($keys as $key) {
|
foreach ($keys as $key) {
|
||||||
$key->storeInFileSystem();
|
$key->storeInFileSystem();
|
Reference in New Issue
Block a user