Skip to content

Commit 38d4654

Browse files
committed
Improve geoip updater to re-download less frequently on restarts.
On restarts, we ended up re-downloading the geoip data file each time if it was older than a day. This improves things so we now touch the file any time we download it (even if the file contents are the same), so we know it's been checked recently.
1 parent b332e9f commit 38d4654

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

bin/api-umbrella-geoip-auto-updater

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,10 @@ while true; do
6969
echo "Reloading api-umbrella failed"
7070
fi
7171
fi
72+
73+
# Touch the file so we know we've checked it recently (even if we didn't
74+
# replace it).
75+
touch "$current_path"
7276
fi
7377
fi
7478

0 commit comments

Comments
 (0)