Files
Pi-Hole/check_pihole.sh
T
kai 1c7288ce79 weitere Checks
weitere Checks hinzugefügt die den schwenk schneller verursachen
2026-04-26 15:00:49 +00:00

18 lines
498 B
Bash

#!/bin/bash
# 1. FTL muss laufen
systemctl is-active --quiet pihole-FTL || exit 1
# 2. DNS muss antworten
dig google.com @127.0.0.1 +time=1 +tries=1 +short | grep -q . || exit 1
# 3. Blocking muss funktionieren
dig doubleclick.net @127.0.0.1 +time=1 +tries=1 +short | grep -Eq "0.0.0.0|::" || exit 1
# 4. NTP muss synchron sein (DEIN Wunsch!)
timedatectl | grep -q "synchronized: yes" || exit 1
# 5. Pi-hole darf nicht disabled sein
pihole status | grep -q "blocking enabled" || exit 1
exit 0