1
0
mirror of https://github.com/pi-hole/pi-hole synced 2024-12-22 14:58:08 +00:00

Wait after restarting FTL before trying to check version (#5613)

This commit is contained in:
Dominik 2024-09-04 20:17:15 +02:00 committed by GitHub
commit 59e25d0283
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -193,6 +193,19 @@ checkout() {
FTLinstall "${binary}"
restart_service pihole-FTL
enable_service pihole-FTL
str="Restarting FTL..."
echo -ne " ${INFO} ${str}"
# Wait until name resolution is working again after restarting FTL,
# so that the updatechecker can run successfully and does not fail
# trying to resolve github.com
until getent hosts github.com &> /dev/null; do
# Append one dot for each second waiting
str="${str}."
echo -ne " ${OVER} ${INFO} ${str}"
sleep 1
done
echo -e " ${OVER} ${TICK} Restarted FTL service"
# Update local and remote versions via updatechecker
/opt/pihole/updatecheck.sh
else