mirror of
https://github.com/pi-hole/pi-hole.git
synced 2024-12-26 14:50:17 +00:00
Wait after restarting FTL before trying to check version
Signed-off-by: DL6ER <dl6er@dl6er.de>
This commit is contained in:
parent
4209e7dee8
commit
b4444023a2
1 changed files with 13 additions and 0 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue