From 7645b2899b2fda1186afb8cd0087c1542f99a9dd Mon Sep 17 00:00:00 2001 From: Bozhidar Slaveykov Date: Sun, 7 Apr 2024 16:44:26 +0300 Subject: [PATCH] Update ApacheWebsiteCreate.php --- web/app/Actions/ApacheWebsiteCreate.php | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/web/app/Actions/ApacheWebsiteCreate.php b/web/app/Actions/ApacheWebsiteCreate.php index 5f33fd5..6192fe2 100644 --- a/web/app/Actions/ApacheWebsiteCreate.php +++ b/web/app/Actions/ApacheWebsiteCreate.php @@ -55,13 +55,15 @@ class ApacheWebsiteCreate public function handle() { - $getLinuxUser = new GetLinuxUser(); - $getLinuxUser->setUsername($this->user); - $linuxUser = $getLinuxUser->handle(); +// $getLinuxUser = new GetLinuxUser(); +// $getLinuxUser->setUsername($this->user); +// $linuxUser = $getLinuxUser->handle(); +// +// if (empty($linuxUser)) { +// return false; +// } - if (empty($linuxUser)) { - return false; - } + $linuxUser = $this->user; if ($this->isMainDomain) { $allDomainsRoot = '/home/'.$this->user.'/public_html'; @@ -104,7 +106,7 @@ class ApacheWebsiteCreate mkdir($domainPublic); } - shell_exec('chmod -R 775 /etc/apache2/sites-available/'); + // shell_exec('chmod -R 775 /etc/apache2/sites-available/'); file_put_contents('/etc/apache2/sites-available/'.$settings['domain'].'.conf', $apache2Sample);