Skip to content

Commit fe84113

Browse files
committed
Update geoip provider, add cronjob to update
1 parent f63ed6d commit fe84113

6 files changed

Lines changed: 22 additions & 2 deletions

File tree

Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ RUN \
4242
pygeoip && \
4343
echo "**** grab GeoIP database ****" && \
4444
curl -L --retry 10 --retry-max-time 60 --retry-all-errors \
45-
"https://mailfud.org/geoip-legacy/GeoIP.dat.gz" \
45+
"https://geo.el0.org/GeoIP.dat.gz" \
4646
| gunzip > /usr/share/GeoIP/GeoIP.dat && \
4747
printf "Linuxserver.io version: ${VERSION}\nBuild-date: ${BUILD_DATE}" > /build_version && \
4848
echo "**** cleanup ****" && \

Dockerfile.aarch64

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ RUN \
4242
pygeoip && \
4343
echo "**** grab GeoIP database ****" && \
4444
curl -L --retry 10 --retry-max-time 60 --retry-all-errors \
45-
"https://mailfud.org/geoip-legacy/GeoIP.dat.gz" \
45+
"https://geo.el0.org/GeoIP.dat.gz" \
4646
| gunzip > /usr/share/GeoIP/GeoIP.dat && \
4747
printf "Linuxserver.io version: ${VERSION}\nBuild-date: ${BUILD_DATE}" > /build_version && \
4848
echo "**** cleanup ****" && \

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -315,6 +315,7 @@ Once registered you can define the dockerfile to use with `-f Dockerfile.aarch64
315315

316316
## Versions
317317

318+
* **23.08.25:** - Update GeoIP provider, add weekly cronjob to update.
318319
* **09.07.25:** - Rebase to Alpine 3.22.
319320
* **12.01.25:** - Rebase to Alpine 3.21.
320321
* **19.09.24:** - Prevent race condition related delay during container stop.

readme-vars.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -95,6 +95,7 @@ init_diagram: |
9595
"deluge:libtorrentv1" <- Base Images
9696
# changelog
9797
changelogs:
98+
- {date: "23.08.25:", desc: "Update GeoIP provider, add weekly cronjob to update."}
9899
- {date: "09.07.25:", desc: "Rebase to Alpine 3.22."}
99100
- {date: "12.01.25:", desc: "Rebase to Alpine 3.21."}
100101
- {date: "19.09.24:", desc: "Prevent race condition related delay during container stop."}

root/app/update-geoip.sh

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
#!/usr/bin/with-contenv bash
2+
# shellcheck shell=bash
3+
4+
# Sleep a random amount of time up to 3 hours so we're not hitting the server all at once
5+
sleep $(( RANDOM % 10800 ))
6+
7+
# downlad latest GeoIP.dat
8+
geoip_dat_path="/usr/share/GeoIP/GeoIP.dat"
9+
10+
if [[ -e "${geoip_dat_path}" ]]; then
11+
curl -s -L --retry 2 --retry-max-time 10 --retry-all-errors \
12+
"https://geo.el0.org/GeoIP.dat.gz" |
13+
gunzip > /tmp/GeoIP.dat && \
14+
mv /tmp/GeoIP.dat "${geoip_dat_path}" && \
15+
chmod 644 "${geoip_dat_path}"
16+
fi

root/crontabs/root

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
# min hour day month weekday command
2+
0 3 * * 0 /app/geoip-update.sh 2>&1

0 commit comments

Comments
 (0)