From 1c7288ce794989a2afbe828d1694c52828a26f79 Mon Sep 17 00:00:00 2001 From: kai Date: Sun, 26 Apr 2026 15:00:49 +0000 Subject: [PATCH] weitere Checks MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit weitere Checks hinzugefügt die den schwenk schneller verursachen --- check_pihole.sh | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/check_pihole.sh b/check_pihole.sh index 678600a..6f8b423 100644 --- a/check_pihole.sh +++ b/check_pihole.sh @@ -1,12 +1,18 @@ #!/bin/bash -# Pi-hole service +# 1. FTL muss laufen systemctl is-active --quiet pihole-FTL || exit 1 -# DNS functional test -dig google.com @127.0.0.1 +short | grep -q . || exit 1 +# 2. DNS muss antworten +dig google.com @127.0.0.1 +time=1 +tries=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 +# 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 \ No newline at end of file