andre пре 7 месеци
родитељ
комит
98625fcd0a
2 измењених фајлова са 3 додато и 7 уклоњено
  1. 1 5
      controllers/AccountController.php
  2. 2 2
      controllers/SiteController.php

+ 1 - 5
controllers/AccountController.php

@@ -7,11 +7,7 @@ class AccountController {
         $domain =    $data['domain'];
         $adminName = $data['admin_name'] ?? '';
         $adminPassword = $data['admin_password'];
-        $webDir = "/home/$username/$domain";
-        $placeholderdir = "/var/www/catchall";
-        $configTemplate = '/etc/apache2/site-config.in';
-        $configFile = "/etc/apache2/sites-enabled/$domain.conf";
-
+ 
         if (empty($username) || empty($domain) || empty($adminName) || empty($adminPassword)) {
             error_log("deploy: ERROR: No username, domain, admin_name or admin_password provided");
             http_response_code(400);

+ 2 - 2
controllers/SiteController.php

@@ -27,12 +27,12 @@ class SiteController {
             return;
         }
 
-        error_log(" Starting function deploy for " . $username . " and " . $domain . "  DebugMode: " . $GLOBALS['debug']);
+        error_log(" Starting function init for " . $username . " and " . $domain . "  DebugMode: " . $GLOBALS['debug']);
 
         if ($GLOBALS['debug'] == true) { error_log("Creating Webdir ($webDir) for : " . $username); }
         exec("sudo /usr/bin/mkdir -p $webDir 2>&1", $mkdirOutput, $mkdirReturnCode);
             if ($mkdirReturnCode !== 0) {
-                error_log("deploy: ERROR: Create Webdir $webDir for $username failed, details => ". implode("\n", $mkdirOutput));
+                error_log("init: ERROR: Create Webdir $webDir for $username failed, details => ". implode("\n", $mkdirOutput));
                 http_response_code(500);
                 echo json_encode(['error' => 'Failed to create web dir', 'details' => implode("\n", $mkdirOutput)]);
                 return;