Use FTL's build-in wait-for command for checking the logs

Signed-off-by: yubiuser <github@yubiuser.dev>
This commit is contained in:
yubiuser
2025-09-24 10:04:13 +02:00
parent 5ff925b66f
commit 647f6c94ea
2 changed files with 4 additions and 5 deletions

View File

@@ -75,10 +75,9 @@ start() {
sleep 0.5
done
# Wait until the FTL log contains the "FTL started" message before continuing
while ! grep -q '########## FTL started' /var/log/pihole/FTL.log; do
sleep 0.5
done
# Wait until the FTL log contains the "FTL started" message before continuing, timeout after 10 seconds
logsize_before=$(stat -c%s /var/log/pihole/FTL.log)
pihole-FTL wait-for '########## FTL started' /var/log/pihole/FTL.log 10 "${logsize_before}" > /dev/null
pihole updatechecker
local versionsOutput