mirror of
https://github.com/PhyreApps/PhyrePanel.git
synced 2024-11-21 23:20:24 +00:00
update
This commit is contained in:
parent
663ad25541
commit
3e3e0633df
2 changed files with 9 additions and 1 deletions
|
@ -15,6 +15,10 @@ class ApacheWebsiteDelete
|
|||
|
||||
public function handle()
|
||||
{
|
||||
if (empty($this->domain)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
$apacheConf = '/etc/apache2/sites-available/'.$this->domain.'.conf';
|
||||
shell_exec('rm -rf '.$apacheConf);
|
||||
|
||||
|
|
|
@ -92,7 +92,11 @@ class Domain extends Model
|
|||
|
||||
static::deleting(function ($model) {
|
||||
|
||||
ShellApi::exec('rm -rf '.$model->domain_public);
|
||||
if (empty($model->domain_public)) {
|
||||
return;
|
||||
}
|
||||
|
||||
shell_exec('rm -rf '.$model->domain_public);
|
||||
|
||||
$deleteApacheWebsite = new ApacheWebsiteDelete();
|
||||
$deleteApacheWebsite->setDomain($model->domain);
|
||||
|
|
Loading…
Reference in a new issue