Colourise tailFunc (#1550)

* Colourise tailFunc

* Strip month, day number and dnsmasq[PID]
* Blocked domains show as light red
* Queries show as standard colour
* Everything else as dark gray

* Change tailFunc highlighted lines

* Highlight Blocked/Blacklist/Wildcard lines as red
* Make DHCP lines default colour

* Make sure tailFunc doesn't match on domain names
pull/1583/head
WaLLy3K 7 years ago committed by DL6ER
parent 6ce79ae1d0
commit 209fbf82c4

@ -340,8 +340,13 @@ piholeStatus() {
}
tailFunc() {
date=$(date +'%b %d ')
echo -e " ${INFO} Press Ctrl-C to exit"
tail -F /var/log/pihole.log
tail -f /var/log/pihole.log | sed \
-e "s,\(${date}\| dnsmasq\[.*[0-9]]\),,g" \
-e "s,\(.*\(gravity.list\|black.list\| config \).* is \(${IPV4_ADDRESS%/*}\|${IPV6_ADDRESS:-NULL}\).*\),${COL_LIGHT_RED}&${COL_NC}," \
-e "s,.*\(query\[A\|DHCP\).*,${COL_NC}&${COL_NC}," \
-e "s,.*,${COL_DARK_GRAY}&${COL_NC},"
exit 0
}

Loading…
Cancel
Save