log lol, logo

This commit is contained in:
Flummi
2021-12-23 11:05:36 +01:00
parent bad5a5f7f0
commit 99598d9bb3
3 changed files with 12 additions and 15 deletions

View File

@ -118,10 +118,10 @@ export default (router, tpl) => {
});
router.get(/^\/admin\/log(\/)?$/, auth, async (req, res) => {
exec("journalctl -xu f0ck", (err, stdout) => {
exec("journalctl -qeu f0ck --no-pager", (err, stdout) => {
res.reply({
body: tpl.render("admin/log", {
log: stdout.split("\n").slice(-500)
log: stdout.split("\n").slice(0, -1)
}, req)
});
});