File tree Expand file tree Collapse file tree
etc/s6-overlay/s6-rc.d/init-deluge-config Expand file tree Collapse file tree Original file line number Diff line number Diff line change 3434 p7zip && \
3535 echo "**** grab GeoIP database ****" && \
3636 curl -L --retry 10 --retry-max-time 60 --retry-all-errors \
37- "https://geo.el0.org /GeoIP.dat.gz" \
37+ "https://geoip.linuxserver.io /GeoIP.dat.gz" \
3838 | gunzip > /usr/share/GeoIP/GeoIP.dat && \
3939 printf "Linuxserver.io version: ${VERSION}\n Build-date: ${BUILD_DATE}" > /build_version && \
4040 echo "**** cleanup ****" && \
Original file line number Diff line number Diff line change 3434 p7zip && \
3535 echo "**** grab GeoIP database ****" && \
3636 curl -L --retry 10 --retry-max-time 60 --retry-all-errors \
37- "https://geo.el0.org /GeoIP.dat.gz" \
37+ "https://geoip.linuxserver.io /GeoIP.dat.gz" \
3838 | gunzip > /usr/share/GeoIP/GeoIP.dat && \
3939 printf "Linuxserver.io version: ${VERSION}\nBuild-date: ${BUILD_DATE}" > /build_version && \
4040 echo "**** cleanup ****" && \
Original file line number Diff line number Diff line change @@ -80,10 +80,18 @@ Change the inbound port to 6881 (or whichever port you've mapped for the contain
8080
8181This image can be run with a read-only container filesystem. For details please [ read the docs] ( https://docs.linuxserver.io/misc/read-only/ ) .
8282
83+ ### Caveats
84+
85+ * Automatic GeoIP updates will not work
86+
8387## Non-Root Operation
8488
8589This image can be run with a non-root user. For details please [ read the docs] ( https://docs.linuxserver.io/misc/non-root/ ) .
8690
91+ ### Caveats
92+
93+ * Automatic GeoIP updates will not work
94+
8795## Usage
8896
8997To help you get started creating a container from this image you can either use docker-compose or the docker cli.
@@ -315,6 +323,7 @@ Once registered you can define the dockerfile to use with `-f Dockerfile.aarch64
315323
316324# # Versions
317325
326+ * ** 29.12.25:** - Fix some issues with GeoIP updates.
318327* ** 23.08.25:** - Update GeoIP provider, add weekly cronjob to update.
319328* ** 12.01.25:** - Rebase libtorrentv1 branch to Alpine 3.21.
320329* ** 19.09.24:** - Prevent race condition related delay during container stop.
Original file line number Diff line number Diff line change @@ -41,7 +41,11 @@ opt_param_usage_include_ports: true
4141opt_param_ports :
4242 - {external_port: "58846", internal_port: "58846", port_desc: "Default deluged port for thin client connectivity"}
4343readonly_supported : true
44+ readonly_message : |
45+ * Automatic GeoIP updates will not work
4446nonroot_supported : true
47+ nonroot_message : |
48+ * Automatic GeoIP updates will not work
4549# application setup block
4650app_setup_block_enabled : true
4751app_setup_block : |
@@ -96,6 +100,7 @@ init_diagram: |
96100 "deluge:latest" <- Base Images
97101# changelog
98102changelogs :
103+ - {date: "29.12.25:", desc: "Fix some issues with GeoIP updates."}
99104 - {date: "23.08.25:", desc: "Update GeoIP provider, add weekly cronjob to update."}
100105 - {date: "12.01.25:", desc: "Rebase libtorrentv1 branch to Alpine 3.21."}
101106 - {date: "19.09.24:", desc: "Prevent race condition related delay during container stop."}
Original file line number Diff line number Diff line change @@ -8,9 +8,15 @@ sleep $(( RANDOM % 10800 ))
88geoip_dat_path=" /usr/share/GeoIP/GeoIP.dat"
99
1010if [[ -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} "
11+ # Only update if the SHAs are different
12+ source_sha=$( sha1sum " ${geoip_dat_path} " | awk ' {print $1}' )
13+ dest_sha=$( curl -s -L --retry 2 --retry-max-time 10 --retry-all-errors " https://geoip.linuxserver.io/dat_sha1.txt" )
14+
15+ if [[ " ${source_sha} " != " ${dest_sha} " ]]; then
16+ curl -s -L --retry 2 --retry-max-time 10 --retry-all-errors \
17+ " https://geoip.linuxserver.io/GeoIP.dat.gz" |
18+ gunzip > /tmp/GeoIP.dat && \
19+ mv /tmp/GeoIP.dat " ${geoip_dat_path} " && \
20+ chmod 644 " ${geoip_dat_path} "
21+ fi
1622fi
Load Diff This file was deleted.
Original file line number Diff line number Diff line change @@ -12,6 +12,13 @@ if [[ ! -d /config/torrents ]]; then
1212 mkdir -p /config/torrents
1313fi
1414
15+ if [[ -z ${LSIO_READ_ONLY_FS} ]] && [[ -z ${LSIO_NON_ROOT_USER} ]]; then
16+ # Pick a random day and hour to update the GeoIP DB
17+ X=$(shuf -i 0-23 -n 1)
18+ Y=$(shuf -i 0-6 -n 1)
19+ (crontab -l 2>/dev/null; echo "0 ${X} * * ${Y} /app/geoip-update.sh 2>&1") | crontab -
20+ fi
21+
1522if [[ -z ${LSIO_NON_ROOT_USER} ]]; then
1623 # permissions
1724 lsiown -R abc:abc \
You can’t perform that action at this time.
0 commit comments