From 890f824c062e4beacbff85188639764d74044442 Mon Sep 17 00:00:00 2001 From: Bozhidar Date: Tue, 10 Sep 2024 15:44:35 +0300 Subject: [PATCH] Update RunRepair.php --- web/app/Console/Commands/RunRepair.php | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/web/app/Console/Commands/RunRepair.php b/web/app/Console/Commands/RunRepair.php index 62f7d79..b83a9da 100644 --- a/web/app/Console/Commands/RunRepair.php +++ b/web/app/Console/Commands/RunRepair.php @@ -36,6 +36,15 @@ class RunRepair extends Command public function handle() { + // Find broken domains + $findBrokenDomains = Domain::where('status', Domain::STATUS_BROKEN)->get(); + if ($findBrokenDomains) { + foreach ($findBrokenDomains as $brokenDomain) { + $brokenDomain->status = Domain::STATUS_ACTIVE; + $brokenDomain->saveQuietly(); + } + } + // Overwrite supervisor config file $workersCount = (int) setting('general.supervisor_workers_count'); $supervisorConf = view('actions.samples.ubuntu.supervisor-conf', [ @@ -90,6 +99,9 @@ class RunRepair extends Command $checkApacheStatus = shell_exec('service apache2 status'); if (strpos($checkApacheStatus, 'Syntax error on line') !== false) { + $this->error('Apache syntax error found'); + $this->error($checkApacheStatus); + $apacheErrorLine = null; preg_match('/Syntax error on line (\d+)/', $checkApacheStatus, $matchApacheErrorLine); if (isset($matchApacheErrorLine[1]) && is_numeric($matchApacheErrorLine[1])) {