Merge pull request #997 from linuxserver/mods-scripts-modcache-timeout

This commit is contained in:
Adam
2024-12-31 18:10:07 +00:00
committed by GitHub
+3 -3
View File
@@ -5,7 +5,7 @@
# Version 3
# 2022-09-25 - Initial Release
MOD_SCRIPT_VER="3.20241223"
MOD_SCRIPT_VER="3.20241230"
# Define custom folder paths
SCRIPTS_DIR="/custom-cont-init.d"
@@ -385,12 +385,12 @@ run_mods() {
write_mod_info "Downloading ${DOCKER_MOD} from ${REGISTRY}"
if [[ -f "/modcache/${FILENAME}.lock" ]]; then
write_mod_info "${DOCKER_MOD} is already being downloaded by another container, waiting..."
for ((i = 5 ; i < 21 ; i=i*2 )); do
for ((i = 5 ; i < 41 ; i=i*2 )); do
sleep $i
if [[ ! -f "/modcache/${FILENAME}.lock" ]]; then
SKIP_MOD_DOWNLOAD=true
break
elif [[ $i == 20 ]]; then
elif [[ $i == 40 ]]; then
write_mod_error "${DOCKER_MOD} timed out waiting for lock, skipping\n\tIf no other containers are using this mod you may need to delete /modcache/${FILENAME}.lock"
SKIP_MOD=true
fi