This commit is contained in:
Bozhidar 2024-09-12 14:33:34 +03:00
parent 9c6c3795cd
commit 6f11754221
3 changed files with 7 additions and 12 deletions

View file

@ -8,14 +8,14 @@ use MicroweberPackages\SharedServerScripts\MicroweberReinstaller;
use Modules\Microweber\App\Actions\MicroweberScanner;
use Modules\Microweber\App\Models\MicroweberInstallation;
class RunDomainRepair extends Command
class ReinstallMicroweberInstallations extends Command
{
/**
* The name and signature of the console command.
*
* @var string
*/
protected $signature = 'microweber:run-domain-repair';
protected $signature = 'microweber:reinstall-installations';
/**
* The console command description.
@ -29,9 +29,6 @@ class RunDomainRepair extends Command
*/
public function handle()
{
// $newMwScan = new MicroweberScanner();
// $newMwScan->handle();
$getMwInstallations = MicroweberInstallation::all();
if ($getMwInstallations->count() > 0) {
foreach ($getMwInstallations as $mwInstallation) {
@ -42,11 +39,6 @@ class RunDomainRepair extends Command
continue;
}
if (is_link($mwInstallation->installation_path.'/userfiles/modules/logo')) {
$this->info('Symlink exists: ' . $mwInstallation->installation_path.'/userfiles/modules/logo');
continue;
}
$this->info('Repair domain: ' . $domain->domain);
$microweberReinstall = new MicroweberReinstaller();

View file

@ -7,7 +7,7 @@ use BladeUI\Icons\Factory;
use Illuminate\Support\Facades\Blade;
use Illuminate\Support\Facades\Event;
use Illuminate\Support\ServiceProvider;
use Modules\Microweber\App\Console\Commands\RunDomainRepair;
use Modules\Microweber\App\Console\Commands\ReinstallMicroweberInstallations;
use Modules\Microweber\Listeners\DomainIsCreatedListener;
use Modules\Microweber\MicroweberApacheVirtualHostConfig;
use Modules\Microweber\MicroweberBackupConfig;
@ -58,7 +58,7 @@ class MicroweberServiceProvider extends ServiceProvider
protected function registerCommands(): void
{
$this->commands([
RunDomainRepair::class
ReinstallMicroweberInstallations::class
]);
}

View file

@ -8,6 +8,7 @@ use Illuminate\Contracts\Queue\ShouldQueue;
use Illuminate\Foundation\Bus\Dispatchable;
use Illuminate\Queue\InteractsWithQueue;
use Illuminate\Queue\SerializesModels;
use Illuminate\Support\Facades\Artisan;
use MicroweberPackages\ComposerClient\Client;
use MicroweberPackages\SharedServerScripts\MicroweberDownloader;
use MicroweberPackages\SharedServerScripts\MicroweberModuleConnectorsDownloader;
@ -52,6 +53,8 @@ class DownloadMicroweber implements ShouldQueue
$templatesDownloader->setComposerClient($instance);
$status = $templatesDownloader->download(config('microweber.sharedPaths.templates'));
Artisan::call('microweber:reinstall-installations');
}
}