diff --git a/syslog-ng/index.cgi b/syslog-ng/index.cgi index 7d6557712..9bb4d5aa0 100755 --- a/syslog-ng/index.cgi +++ b/syslog-ng/index.cgi @@ -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") . "


"; + } + } if (!$ver) { &ui_print_header(undef, $text{'index_title'}, "", undef, 1, 1); - &ui_print_endpage(&text('index_eprog', "$config{'syslogng_cmd'}", "../config.cgi?$module_name")); + &ui_print_endpage($index_econf2 . &text('index_eprog', "$config{'syslogng_cmd'}", "../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', "$config{'syslogng_conf'}", "../config.cgi?$module_name")); + &ui_print_endpage($index_econf2 . &text('index_econf', "$config{'syslogng_conf'}", "../config.cgi?$module_name")); } &ui_print_header(undef, $text{'index_title'}, "", "intro", 1, 1, 0, diff --git a/syslog-ng/lang/en b/syslog-ng/lang/en index ed48adc51..9f4da8439 100644 --- a/syslog-ng/lang/en +++ b/syslog-ng/lang/en @@ -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 module configuration to use the correct path. index_econf=The Syslog-NG configuration file $1 was not found on your system. Adjust the module configuration to use the correct path. +index_econf2=The systemd-journald service was detected on your system for collecting and storing logging data. It is recommended to use a new $1 module instead. index_apply=Apply Configuration index_applydesc=Click this button to activate the current Syslog-NG configuration. index_stop=Stop Syslog-NG diff --git a/syslog/index.cgi b/syslog/index.cgi index 790bfb4ea..de6837e92 100755 --- a/syslog/index.cgi +++ b/syslog/index.cgi @@ -22,8 +22,15 @@ if ($config{'m4_conf'}) { } if (!-r $config{'syslog_conf'}) { + # 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") . "


"; + } + } # Not installed (maybe using syslog-ng) - &ui_print_endpage(&text('index_econf', "$config{'syslog_conf'}", "../config.cgi?$module_name")); + &ui_print_endpage($index_econf2 . &text('index_econf', "$config{'syslog_conf'}", "../config.cgi?$module_name")); } # Display syslog rules diff --git a/syslog/lang/en b/syslog/lang/en index e930fb991..5966083c1 100644 --- a/syslog/lang/en +++ b/syslog/lang/en @@ -2,6 +2,7 @@ index_title=System Logs index_m4msg=Your system log configuration file $1 appears to contain m4 directives. Before it can be edited, Webmin needs to pass the file through m4 to safely remove these directives. index_m4=Remove m4 directives from config file index_econf=The syslog configuration file $1 was not found on your system. Maybe syslog is not installed, or a newer version like syslog-ng is in use, or the module configuration is incorrect. +index_econf2=The systemd-journald service was detected on your system for collecting and storing logging data. It is recommended to use a new $1 module instead. index_active=Active? index_tag=Program index_to=Log destination