Merge pull request #1655 from webmin/dev/new-journald-module

Add new System Logs Viewer (`logviewer`) module
This commit is contained in:
Jamie Cameron
2022-06-04 08:10:58 -07:00
committed by GitHub
20 changed files with 743 additions and 4 deletions

View File

@@ -5,9 +5,16 @@ require './syslog-ng-lib.pl';
# Make sure it is installed
$ver = &get_syslog_ng_version();
# Suggest using a new module
my $index_econf2;
if (&has_command('systemctl')) {
if (&foreign_available('logviewer')) {
$index_econf2 = &text('index_econf2', "System Logs Viewer", "@{[&get_webprefix()]}/logviewer") . "<p><br>";
}
}
if (!$ver) {
&ui_print_header(undef, $text{'index_title'}, "", undef, 1, 1);
&ui_print_endpage(&text('index_eprog', "<tt>$config{'syslogng_cmd'}</tt>", "../config.cgi?$module_name"));
&ui_print_endpage($index_econf2 . &text('index_eprog', "<tt>$config{'syslogng_cmd'}</tt>", "../config.cgi?$module_name"));
}
if (!-r $config{'syslogng_conf'} && -r $config{'alt_syslogng_conf'}) {
# Copy original template config file
@@ -16,7 +23,7 @@ if (!-r $config{'syslogng_conf'} && -r $config{'alt_syslogng_conf'}) {
}
if (!-r $config{'syslogng_conf'}) {
&ui_print_header(undef, $text{'index_title'}, "", undef, 1, 1);
&ui_print_endpage(&text('index_econf', "<tt>$config{'syslogng_conf'}</tt>", "../config.cgi?$module_name"));
&ui_print_endpage($index_econf2 . &text('index_econf', "<tt>$config{'syslogng_conf'}</tt>", "../config.cgi?$module_name"));
}
&ui_print_header(undef, $text{'index_title'}, "", "intro", 1, 1, 0,

View File

@@ -1,6 +1,7 @@
index_title=System Logs NG
index_eprog=The system logging daemon $1 was not found on your system, or is not the syslog-ng program. Adjust the <a href='$2'>module configuration</a> to use the correct path.
index_econf=The Syslog-NG configuration file $1 was not found on your system. Adjust the <a href='$2'>module configuration</a> to use the correct path.
index_econf2=The <tt>systemd-journald</tt> service was detected on your system for collecting and storing logging data. It is recommended to use a new <a href='$2'>$1</a> module instead.
index_apply=Apply Configuration
index_applydesc=Click this button to activate the current Syslog-NG configuration.
index_stop=Stop Syslog-NG