This commit is contained in:
2024-12-25 08:40:56 +01:00
parent 97e896b1a2
commit 4a50de92e3
169 changed files with 16476 additions and 1 deletions

View File

@@ -0,0 +1,15 @@
module systemd
import freeflowuniverse.herolib.osal
pub struct JournalArgs {
pub:
service string // name of service for which logs will be retrieved
limit int = 100 // number of last log lines to be shown
}
pub fn journalctl(args JournalArgs) !string {
cmd := 'journalctl --no-pager -n ${args.limit} -u ${name_fix(args.service)}'
response := osal.execute_silent(cmd) or { return err }
return response
}