From cceb3bca0a2ec9e8d7b0372bd434f673a51aa6d9 Mon Sep 17 00:00:00 2001 From: Georg Pfuetzenreuter Date: Fri, 22 Apr 2022 08:05:07 +0000 Subject: [PATCH] Print better logs on status call Signed-off-by: Georg Pfuetzenreuter --- catsit.in | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/catsit.in b/catsit.in index 82fdd68..a17b461 100644 --- a/catsit.in +++ b/catsit.in @@ -40,4 +40,12 @@ echo "$@" > "${CATSITD_PIPE}" test $quiet && exit sleep 0.1 -tail /var/log/messages | egrep 'calico|catsitd|litterbox|pounce|scooper' + +if [ "${2##*/*}" ] ; +then + egrep -a "calico|catsit|pounce" /var/log/messages | grep "${2}" | tail +fi +if [ ! "${2##*/*}" ] ; +then + egrep -a "calico|catsit|pounce" /var/log/messages | grep "${2#*/}" | tail +fi