mirror of
https://github.com/PhyreApps/PhyrePanel.git
synced 2024-11-21 23:20:24 +00:00
Update RunRepair.php
This commit is contained in:
parent
6b3017177d
commit
890f824c06
1 changed files with 12 additions and 0 deletions
|
@ -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])) {
|
||||
|
|
Loading…
Reference in a new issue