Add lnav-forwarded-logs

This commit is contained in:
Jeffrey Serio 2023-06-03 17:02:02 -05:00
parent 8f4e2fd5f7
commit 1bad5e0de6
1 changed files with 10 additions and 0 deletions

10
lnav-forwarded-logs Executable file
View File

@ -0,0 +1,10 @@
#!/usr/bin/env bash
FORWARDED_LOGS=$(sudo find /var/log -type f -name "forwarded-logs.log")
if [[ -n "$FORWARDED_LOGS" ]]; then
echo "$FORWARDED_LOGS" | xargs sudo lnav
else
echo "No forwarded logs found in /var/log"
exit 1
fi