andre 8 месяцев назад
Родитель
Сommit
18b48cf858
1 измененных файлов с 1 добавлено и 7 удалено
  1. 1 7
      controllers/DeployDevController.php

+ 1 - 7
controllers/DeployDevController.php

@@ -357,12 +357,6 @@ class DeployDevController {
             if ($GLOBALS['debug'] == true) { error_log("Remove config of user : " . $username); }
             exec("sudo /usr/bin/rm -f $configFile 2>&1", $userOutput, $userReturnCode);
             exec("sudo /usr/bin/certbot delete --cert-name dev.$domain --non-interactive 2>&1", $output, $returnCode);
-            if ($returnCode !== 0) {
-                error_log("deploy: ERROR: certbot failed to delete certificate on dev.$domain, details => " . implode("\n", $output));
-                http_response_code(500);
-                echo json_encode(['error' => 'Certbot failed', 'details' => implode("\n", $output)]);
-                return;
-            }
             exec('sudo /usr/bin/systemctl reload apache2  2>&1', $apacheOutput, $apacheReturnCode);
             if ($GLOBALS['debug'] == true) { error_log("Restarting Apache"); }
             if ($apacheReturnCode !== 0) {
@@ -372,7 +366,7 @@ class DeployDevController {
                 return;
             }   
         }
-        echo json_encode(['success' => 'Removing useri ' . $username . ' successfully']);
+        echo json_encode(['success' => 'Removing user ' . $username . ' successfully']);
     }
 
 }