mirror of
https://github.com/pi-hole/pi-hole
synced 2024-12-22 14:58:08 +00:00
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
This commit is contained in:
parent
6ce79ae1d0
commit
209fbf82c4
7
pihole
7
pihole
@ -340,8 +340,13 @@ piholeStatus() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
tailFunc() {
|
tailFunc() {
|
||||||
|
date=$(date +'%b %d ')
|
||||||
echo -e " ${INFO} Press Ctrl-C to exit"
|
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
|
exit 0
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user