Skip to content

Commit 47b02d3

Browse files
committed
Use FTL's build-in wait-for command for checking the logs
Signed-off-by: yubiuser <github@yubiuser.dev>
1 parent 5ff925b commit 47b02d3

1 file changed

Lines changed: 3 additions & 4 deletions

File tree

src/start.sh

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -75,10 +75,9 @@ start() {
7575
sleep 0.5
7676
done
7777

78-
# Wait until the FTL log contains the "FTL started" message before continuing
79-
while ! grep -q '########## FTL started' /var/log/pihole/FTL.log; do
80-
sleep 0.5
81-
done
78+
# Wait until the FTL log contains the "FTL started" message before continuing, timeout after 10 seconds
79+
logsize_before=$(stat -c%s /var/log/pihole/FTL.log)
80+
/usr/bin/pihole-FTL wait-for '########## FTL started' /var/log/pihole/FTL.log 10 "${logsize_before}"
8281

8382
pihole updatechecker
8483
local versionsOutput

0 commit comments

Comments
 (0)