mirror of
https://github.com/PhyreApps/PhyrePanel.git
synced 2024-11-24 16:40:27 +00:00
update
This commit is contained in:
parent
fc22ab52b2
commit
54ef686de6
2 changed files with 9 additions and 5 deletions
|
@ -30,8 +30,9 @@ class RunDomainRepair extends Command
|
|||
if ($getAllDomains->count() > 0) {
|
||||
foreach ($getAllDomains as $domain) {
|
||||
$this->info('Repair domain: ' . $domain->domain);
|
||||
$domain->configureVirtualHost();
|
||||
$domain->configureVirtualHost(false);
|
||||
}
|
||||
shell_exec('service apache2 restart');
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -106,7 +106,7 @@ class Domain extends Model
|
|||
return $this->belongsTo(HostingSubscription::class);
|
||||
}
|
||||
|
||||
public function configureVirtualHost()
|
||||
public function configureVirtualHost($reloadApache = true)
|
||||
{
|
||||
$findHostingSubscription = \App\Models\HostingSubscription::where('id', $this->hosting_subscription_id)
|
||||
->first();
|
||||
|
@ -299,8 +299,9 @@ class Domain extends Model
|
|||
}
|
||||
|
||||
// Reload apache
|
||||
shell_exec('systemctl reload apache2');
|
||||
|
||||
if ($reloadApache) {
|
||||
shell_exec('systemctl reload apache2');
|
||||
}
|
||||
$catchMainDomain = '';
|
||||
$domainExp = explode('.', $this->domain);
|
||||
if (count($domainExp) > 0) {
|
||||
|
@ -377,7 +378,9 @@ class Domain extends Model
|
|||
shell_exec('ln -s /etc/apache2/sites-available/'.$this->domain.'-ssl.conf /etc/apache2/sites-enabled/'.$this->domain.'-ssl.conf');
|
||||
|
||||
// Reload apache
|
||||
shell_exec('systemctl reload apache2');
|
||||
if ($reloadApache) {
|
||||
shell_exec('systemctl reload apache2');
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue