From ab09c8451451fef07d5c593755ae17666cd6f70c Mon Sep 17 00:00:00 2001 From: Miraty Date: Fri, 10 Jun 2022 03:14:58 +0200 Subject: [PATCH] Remove niver.log --- .gitignore | 1 - fn/ht.php | 12 ------------ niver.log | 0 public/ht/le.php | 3 --- 4 files changed, 16 deletions(-) delete mode 100644 niver.log diff --git a/.gitignore b/.gitignore index 2ade754..71c9624 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1 @@ -/niver.log /db/niver.db diff --git a/fn/ht.php b/fn/ht.php index a1092f7..059a7bb 100644 --- a/fn/ht.php +++ b/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; diff --git a/niver.log b/niver.log deleted file mode 100644 index e69de29..0000000 diff --git a/public/ht/le.php b/public/ht/le.php index 3a31725..536be22 100644 --- a/public/ht/le.php +++ b/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.");