check_pihole.sh
check_pihole.sh angelegt
This commit is contained in:
@@ -0,0 +1,12 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Pi-hole service
|
||||
systemctl is-active --quiet pihole-FTL || exit 1
|
||||
|
||||
# DNS functional test
|
||||
dig google.com @127.0.0.1 +short | grep -q . || exit 1
|
||||
|
||||
# Blocking test (critical!)
|
||||
dig doubleclick.net @127.0.0.1 +short | grep -q "0.0.0.0" || exit 1
|
||||
|
||||
exit 0
|
||||
Reference in New Issue
Block a user