From c422132ae62d55c13e991b7b9123a83a8c29bd02 Mon Sep 17 00:00:00 2001 From: Ad Schellevis Date: Tue, 3 Dec 2019 20:40:51 +0100 Subject: [PATCH] log: acme-client, acme.sh.log filename not compatible with new log view. https://github.com/opnsense/plugins/issues/1593 --- .../src/www/diag_logs_acmeclient.php | 2 +- .../www/diag_logs_template_acme-client.inc | 117 ++++++++++++++++++ 2 files changed, 118 insertions(+), 1 deletion(-) create mode 100644 security/acme-client/src/www/diag_logs_template_acme-client.inc diff --git a/security/acme-client/src/www/diag_logs_acmeclient.php b/security/acme-client/src/www/diag_logs_acmeclient.php index 8d26ea69f..e5d406e95 100644 --- a/security/acme-client/src/www/diag_logs_acmeclient.php +++ b/security/acme-client/src/www/diag_logs_acmeclient.php @@ -4,4 +4,4 @@ $logfile = '/var/log/acme.sh.log'; $logclog = false; $logsplit = 6; -require_once 'diag_logs_template.inc'; +require_once 'diag_logs_template_acme-client.inc'; diff --git a/security/acme-client/src/www/diag_logs_template_acme-client.inc b/security/acme-client/src/www/diag_logs_template_acme-client.inc new file mode 100644 index 000000000..993181556 --- /dev/null +++ b/security/acme-client/src/www/diag_logs_template_acme-client.inc @@ -0,0 +1,117 @@ + + * Copyright (C) 2004-2009 Scott Ullrich + * Copyright (C) 2003-2004 Manuel Kasper + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, + * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY + * AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, + * OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + */ + +require_once("guiconfig.inc"); +require_once("system.inc"); +require_once("interfaces.inc"); + +/* expects $logfile to point to the system path */ +/* expects $logclog to be true or false */ + +require_once 'diag_logs_common.inc'; + +$filtertext = ''; +$nentries = 50; + +if (isset($config['syslog']['nentries'])) { + $nentries = $config['syslog']['nentries']; +} + +if (!empty($_POST['clear'])) { + if ($logclog) { + system_clear_clog($logfile); + } else { + system_clear_log($logfile); + } +} + +if (isset($_POST['filtertext'])) { + $filtertext = $_POST['filtertext']; +} + +include("head.inc"); +?> + + + +
+
+
+
+

+

+
+
+ +
+
+

+
+ + + + + + + + + + + + + + +
+ +
+
+ + + + +
+
+
+
+
+
+
+