plog: count only relevant lines from syslog

Closes paulusmack/ppp#42
This commit is contained in:
Dmitry Deshevoy 2016-03-31 23:39:32 +04:00
parent 6e8eaa7a78
commit 2ecc3c7ce0

View File

@ -3,5 +3,5 @@
if [ -s /var/log/ppp.log ]; then
exec tail "$@" /var/log/ppp.log
else
exec tail "$@" /var/log/syslog | grep ' \(pppd\|chat\)\['
exec grep ' \(pppd\|chat\)\[' /var/log/syslog | tail "$@"
fi