unbound: try resolve twice before time sync with ipfire server

Signed-off-by: Arne Fitzenreiter <arne_f@ipfire.org>
This commit is contained in:
Arne Fitzenreiter
2020-02-03 17:40:55 +00:00
parent f5fe5f47a1
commit f23b046318

View File

@@ -274,6 +274,8 @@ get_memory_amount() {
}
fix_time_if_dns_fails() {
# Sometimes the first try fails so do it twice
resolve "ping.ipfire.org" &>/dev/null
# If DNS is working, everything is fine
if resolve "ping.ipfire.org" &>/dev/null; then
return 0