Optionally show journalctl output

This commit is contained in:
Jamie Cameron
2020-01-18 22:53:16 -08:00
parent 32c4897cc3
commit 31aa75ef18
2 changed files with 20 additions and 0 deletions

View File

@@ -262,4 +262,6 @@ launchd_return=launchd agent
launchd_econf=No launchd configuration entered
launchd_estart=Missing server command
syslog_journalctl=SystemD logs
__norefs=1

18
init/syslog_logs.pl Executable file
View File

@@ -0,0 +1,18 @@
# Contains a function to supply the syslog module with extra logs
do 'init-lib.pl';
# syslog_getlogs()
# Returns the output from journalctl if installed
sub syslog_getlogs
{
if (&has_command("journalctl")) {
return ( { 'cmd' => "journalctl -n 1000",
'desc' => $text{'syslog_journalctl'},
'active' => 1, } );
}
else {
return ( );
}
}