Miraty 3 anni fa
parent
commit
ab09c84514
4 ha cambiato i file con 0 aggiunte e 16 eliminazioni
  1. 0 1
      .gitignore
  2. 0 12
      fn/ht.php
  3. 0 0
      niver.log
  4. 0 3
      public/ht/le.php

+ 0 - 1
.gitignore

@@ -1,2 +1 @@
-/niver.log
 /db/niver.db

+ 0 - 12
fn/ht.php

@@ -6,18 +6,6 @@ function checkDomainFormat($domain) {
 		userError("Wrong domain.");
 }
 
-function addNiverLog($message, $outputLines, $returnCode = false) {
-	$logs = "\n" . date("Y-m-d H:i:s") . " " . $message . "\n";
-	if ($returnCode !== false)
-		$logs = $logs . "Return code: " . $returnCode . "\n";
-	else
-		$logs = $logs . "No return code logged\n";
-	foreach ($outputLines as $outputLine) {
-		$logs = $logs . " " .	$outputLine . "\n";
-	}
-	file_put_contents(CONF['common']['root_path'] . "/niver.log", $logs, FILE_APPEND);
-}
-
 function listFsDirs($username) {
 	$absoluteDirs = glob(CONF['ht']['ht_path'] . "/" . $username . "/*/", GLOB_ONLYDIR);
 	$relativeDirs = false;

+ 0 - 0
niver.log


+ 0 - 3
public/ht/le.php

@@ -27,9 +27,6 @@ switchToFormProcess();
 
 exec(CONF['ht']['sudo_path'] . " " . CONF['ht']['certbot_path'] . " certonly --dry-run --test-cert --webroot --webroot-path /srv/acme --register-unsafely-without-email --agree-tos --domain " . $_POST['domain'], $output, $returnCode);
 
-// Log Certbot response
-addNiverLog($_SESSION['username'] . " installed a Let's Encrypt certificate on their site", $output,	$returnCode);
-
 // Abort if Certbot failed
 if ($returnCode !== 0)
 	serverError("Certbot failed to get a Let's Encrypt certificate.");