Print better logs on status call

Signed-off-by: Georg Pfuetzenreuter <mail@georg-pfuetzenreuter.net>
This commit is contained in:
Georg Pfuetzenreuter 2022-04-22 08:05:07 +00:00
parent ba5d5ce4fb
commit cceb3bca0a
Signed by: Georg
GPG Key ID: 1ED2F138E7E6FF57

View File

@ -40,4 +40,12 @@ echo "$@" > "${CATSITD_PIPE}"
test $quiet && exit test $quiet && exit
sleep 0.1 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