kiwix waits for a non-empty ZIM instead of a restart loop (on the car's server each restart's veth set off avahi's mDNS announcements and filled the Pi's Wi-Fi); pull-maps drops a connection a minute without data so the retry resumes (Wi-Fi switched under it)
CI / check (push) Successful in 22s
CI / deploy (push) Successful in 17s

This commit is contained in:
randy committed 2026-11-29 17:03:53 +01:00
1 parent f9fbcdbbc5
commit ea14b110e6
2 files changed
+10 -3

No files matched your search

+3 -1
View File
@@ -54,7 +54,9 @@ while IFS=$'\t' read -r size mtime path; do
# Into a temp file, renamed when complete: the app and Valhalla keep
# reading the old copy until restarted.
if [ "$(stat -c %s "$part" 2>/dev/null || echo -1)" != "$size" ]; then
curl -fsS --retry 10 --retry-all-errors --retry-delay 5 -C - -o "$part" -H "@$auth" \
# --speed-*: a connection that went dead (Wi-Fi switched, proxy gone)
# is dropped after a minute without data and the retry resumes.
curl -fsS --retry 10 --retry-all-errors --retry-delay 5 --speed-limit 1024 --speed-time 60 -C - -o "$part" -H "@$auth" \
--get --data-urlencode "path=$path" "$server/api/sync/maps/file" || true
fi
if [ "$(stat -c %s "$part" 2>/dev/null || echo -1)" = "$size" ]; then