From 9fdd7947f22f625b06d250e6c9c61c89d03eadf1 Mon Sep 17 00:00:00 2001 From: thespad Date: Mon, 25 Aug 2025 15:25:08 +0100 Subject: [PATCH 1/2] Fix unauthenticated registries --- docker-mods.v3 | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/docker-mods.v3 b/docker-mods.v3 index 9bee23c..cabdaa4 100755 --- a/docker-mods.v3 +++ b/docker-mods.v3 @@ -5,7 +5,7 @@ # Version 3 # 2022-09-25 - Initial Release -MOD_SCRIPT_VER="3.20250106" +MOD_SCRIPT_VER="3.20250825" # Define custom folder paths SCRIPTS_DIR="/custom-cont-init.d" @@ -328,6 +328,7 @@ run_mods() { fi FILENAME="${USERNAME}.${REPO}${TAG:+.${TAG}}${TAGSHA:+.${TAGSHA#*:}}" MANIFEST_URL="https://${REGISTRY}/v2/${ENDPOINT}/manifests" + write_mod_debug "Manifest URL: ${MANIFEST_URL}" BLOB_URL="https://${REGISTRY}/v2/${ENDPOINT}/blobs/" MOD_UA="Mozilla/5.0 (Linux $(uname -m)) linuxserver.io ${REGISTRY}/${ENDPOINT}${TAG:+:${TAG}}${TAGSHA:+@${TAGSHA}}" write_mod_debug "Registry='${REGISTRY}', Repository='${USERNAME}', Image='${ENDPOINT}', Tag='${TAG:-N/A}', TagSHA='${TAGSHA:-N/A}'" @@ -379,8 +380,8 @@ run_mods() { fi ARCH=$(get_arch) write_mod_debug "Arch detected as ${ARCH}" - if [[ -z "${TOKEN}" ]]; then - write_mod_error "Couldn't fetch auth token from ${REGISTRY}, switching to offline mode for ${DOCKER_MOD}" + if [[ -z "${TOKEN}" ]] && [[ -z $(curl -sIk "${MANIFEST_URL}" | grep -E 'HTTP/\S+' | awk {'print $2'}) ]]; then + write_mod_error "No response from ${REGISTRY}, switching to offline mode for ${DOCKER_MOD}" MOD_OFFLINE="true" else # Determine first and only layer of image From 5fcf044c2bba16d74933b38e847052f00e709bc5 Mon Sep 17 00:00:00 2001 From: thespad Date: Mon, 25 Aug 2025 15:27:57 +0100 Subject: [PATCH 2/2] Simplify curl check --- docker-mods.v3 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docker-mods.v3 b/docker-mods.v3 index cabdaa4..7c7b401 100755 --- a/docker-mods.v3 +++ b/docker-mods.v3 @@ -380,7 +380,7 @@ run_mods() { fi ARCH=$(get_arch) write_mod_debug "Arch detected as ${ARCH}" - if [[ -z "${TOKEN}" ]] && [[ -z $(curl -sIk "${MANIFEST_URL}" | grep -E 'HTTP/\S+' | awk {'print $2'}) ]]; then + if [[ -z "${TOKEN}" ]] && [[ -z $(curl -sIk "${MANIFEST_URL}") ]]; then write_mod_error "No response from ${REGISTRY}, switching to offline mode for ${DOCKER_MOD}" MOD_OFFLINE="true" else