mirror of
https://github.com/pi-hole/pi-hole
synced 2024-11-18 06:08:21 +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() {
|
||||
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…
Reference in New Issue
Block a user