mirror of
https://github.com/moparisthebest/pi-hole
synced 2024-11-14 13:25:21 -05:00
fd2b24f2a0
I haven't merged anything before, so hopefully, I won't mess it up too bad!
19 lines
798 B
Bash
Executable File
19 lines
798 B
Bash
Executable File
#!/bin/bash
|
|
# Infinite loop that can be used to display ad domains on a Pi touch screen
|
|
# Continually watch the log file and display ad domains that are blocked being blocked
|
|
# Set the pi user to log in automatically and add run this script from .bashrc
|
|
clear
|
|
echo ""
|
|
echo " +-+-+-+-+-+-+-+ "
|
|
echo " Pi-hole "
|
|
echo " +-+-+-+-+-+-+-+ "
|
|
echo ""
|
|
echo " A black hole for"
|
|
echo " Internet Ads "
|
|
echo ""
|
|
echo " http://pi-hole.net"
|
|
echo ""
|
|
echo " $(ifconfig eth0 | awk '/inet addr/ {print $2}' | cut -d':' -f2)"
|
|
sleep 7
|
|
# Look for only the entries that contain /etc/hosts, indicating the domain was found to be an advertisement
|
|
tail -f /var/log/daemon.log | awk '/\/etc\/hosts/ {if ($7 != "address" && $7 != "name" && $7 != "/etc/hosts") print $7; else;}' |