Compare commits

..

1 Commits

Author SHA1 Message Date
MickLesk
f36beb11b4 update-apps: follow renamed ct/ scripts instead of erroring out
A container keeps the slug it was built with, so a renamed ct/ script leaves
the updater looking for a name that no longer exists.

Reported for pbs, renamed to proxmox-backup-server in 0e5f663df. The Alpine
merge on 2026-08-18 retired 29 more names the same way, so every container
installed from an alpine-* script before that date hits this too.

Candidates are only accepted when the target script really exists, so an
unknown slug still errors rather than running some other app's updater.

Fixes #16989
2026-09-03 15:19:45 +02:00
36 changed files with 51 additions and 61 deletions

View File

@@ -530,28 +530,12 @@ Exercise vigilance regarding copycat or coat-tailing sites that seek to exploit
</details>
## 2026-09-04
### 🚀 Updated Scripts
- #### 🐞 Bug Fixes
- fix-update-authentik-2026.8.1 [@thieneret](https://github.com/thieneret) ([#16999](https://github.com/community-scripts/ProxmoxVE/pull/16999))
### 💾 Core
- setup_go: resolve bare major.minor versions to the latest patch release [@MickLesk](https://github.com/MickLesk) ([core#24](https://github.com/community-scripts/core/pull/24))
## 2026-09-03
### 🚀 Updated Scripts
- Immich: bump libheif and libraw [@vhsdream](https://github.com/vhsdream) ([#16996](https://github.com/community-scripts/ProxmoxVE/pull/16996))
- #### 🐞 Bug Fixes
- romm: allow git-based npm dependency for rom-patcher under npm v12 [@MickLesk](https://github.com/MickLesk) ([#16990](https://github.com/community-scripts/ProxmoxVE/pull/16990))
- Pin Go to the version each project declares in go.mod [@MickLesk](https://github.com/MickLesk) ([#16976](https://github.com/community-scripts/ProxmoxVE/pull/16976))
- Authentik update 2026.8.1 [@thieneret](https://github.com/thieneret) ([#16980](https://github.com/community-scripts/ProxmoxVE/pull/16980))
## 2026-09-02

View File

@@ -44,6 +44,7 @@ function update_script() {
msg_ok "Update dependencies"
NODE_VERSION="26" NODE_MODULE=pnpm@11 setup_nodejs
setup_go
$STD uv cache clean
UV_PYTHON_INSTALL_DIR="/usr/local/bin" PYTHON_VERSION="3.14.7" setup_uv
RUST_PROFILE="minimal" RUST_TOOLCHAIN="stable" setup_rust
@@ -88,14 +89,13 @@ function update_script() {
msg_info "Moving blueprints to presistent directory"
cp -r /opt/authentik/blueprints /opt/authentik-data/
rm -r /opt/authentik/blueprints
chown -Rf authentik:authentik /opt/authentik-data
chown -R authentik:authentik /opt/authentik-data
yq -i ".blueprints_dir = \"/opt/authentik-data/blueprints\"" /etc/authentik/config.yml
msg_ok "blueprints moved to presistent directory"
msg_warn "The blueprints provided by authentik are always overwritten when updated! Only manually created custom blueprints remain unchanged between updates."
fi
CLEAN_INSTALL=1 fetch_and_deploy_gh_release "authentik" "goauthentik/authentik" "tarball" "${AUTHENTIK_VERSION}" "/opt/authentik"
GO_VERSION="$(grep -m1 '^go ' /opt/authentik/go.mod | awk '{print $2}')" setup_go
msg_info "Configuring rust"
cd /opt/authentik
@@ -155,7 +155,7 @@ function update_script() {
cp -r /opt/authentik/blueprints /opt/authentik-data/
rm -r /opt/authentik/blueprints
chown -Rf authentik:authentik /opt/authentik-data
chown -R authentik:authentik /opt/authentik-data
if [[ $MAJOR == 2026 && $MINOR -lt 8 ]]; then
msg_info "Updating Worker and Server config (from $MAJOR.$MINOR)"
@@ -228,7 +228,7 @@ $STD pct exec "$CTID" -- bash -c "mkdir -p /opt/authentik-data/{certs,media,geoi
cp /opt/authentik/tests/GeoLite2-City-Test.mmdb /opt/authentik-data/geoip/GeoLite2-City.mmdb; \
cp -r /opt/authentik/blueprints /opt/authentik-data/; \
rm -r /opt/authentik/blueprints; \
chown -Rf authentik:authentik /opt/authentik-data"
chown -R authentik:authentik /opt/authentik-data"
msg_ok "Attached data storage volume"
msg_info "Starting Services"

View File

@@ -71,7 +71,6 @@ update_deb_based() {
msg_ok "Data backed up"
CLEAN_INSTALL=1 fetch_and_deploy_gh_release "bitmagnet" "bitmagnet-io/bitmagnet" "tarball"
GO_VERSION="$(grep -m1 '^go ' /opt/bitmagnet/go.mod | awk '{print $2}')" setup_go
restore_backup
msg_info "Configuring Bitmagnet"

View File

@@ -37,8 +37,8 @@ function update_script() {
systemctl stop cloudflare-ddns
msg_ok "Stopped Service"
setup_go
CLEAN_INSTALL=1 fetch_and_deploy_gh_release "cloudflare-ddns" "favonia/cloudflare-ddns" "tarball"
GO_VERSION="$(grep -m1 '^go ' /opt/cloudflare-ddns/go.mod | awk '{print $2}')" setup_go
msg_info "Updating ${APP}"
cd /opt/cloudflare-ddns

View File

@@ -70,7 +70,6 @@ function update_script() {
msg_ok "Ensured Database Clients"
CLEAN_INSTALL=1 fetch_and_deploy_gh_release "databasus" "databasus/databasus" "tarball" "latest" "/opt/databasus"
GO_VERSION="$(grep -m1 '^go ' /opt/databasus/backend/go.mod | awk '{print $2}')" setup_go
msg_info "Updating Databasus"
export COREPACK_ENABLE_DOWNLOAD_PROMPT=0

View File

@@ -42,7 +42,6 @@ function update_script() {
create_backup /opt/firecrawl/.env
CLEAN_INSTALL=1 fetch_and_deploy_gh_release "firecrawl" "firecrawl/firecrawl" "tarball" "latest" "/opt/firecrawl"
GO_VERSION="$(grep -m1 '^go ' /opt/firecrawl/apps/api/sharedLibs/go-html-to-md/go.mod | awk '{print $2}')" setup_go
restore_backup

View File

@@ -39,7 +39,6 @@ function update_script() {
msg_ok "Stopped Service"
CLEAN_INSTALL=1 fetch_and_deploy_gh_release "gluetun" "qdm12/gluetun" "tarball"
GO_VERSION="$(grep -m1 '^go ' /opt/gluetun/go.mod | awk '{print $2}')" setup_go
msg_info "Building Gluetun"
cd /opt/gluetun

View File

@@ -477,7 +477,7 @@ function compile_jpegli() {
function compile_libheif() {
SOURCE=${SOURCE_DIR}/libheif
ensure_dependencies libaom-dev
LIBHEIF_REVISION="ac1cb05c39008f01525c991ff8b88f84ddf70fd2"
LIBHEIF_REVISION="62f1b8c76ed4d8305071fdacbe74ef9717bacac5"
# : "${LIBHEIF_REVISION:=$(jq -cr '.revision' "$BASE_DIR"/server/sources/libheif.json)}"
if [[ "${update:-}" ]] || [[ "$LIBHEIF_REVISION" != "$(grep 'libheif' ~/.immich_library_revisions | awk '{print $2}')" ]]; then
msg_info "Recompiling libheif"
@@ -509,7 +509,7 @@ function compile_libheif() {
function compile_libraw() {
SOURCE=${SOURCE_DIR}/libraw
LIBRAW_REVISION="e419de08001de28ae6988ecb22df47e52b9c5eaa"
LIBRAW_REVISION="b860248a89d9082b8e0a1e202e516f46af9adb29"
# : "${LIBRAW_REVISION:=$(jq -cr '.revision' "$BASE_DIR"/server/sources/libraw.json)}"
if [[ "$LIBRAW_REVISION" != "$(grep 'libraw' ~/.immich_library_revisions | awk '{print $2}')" ]]; then
msg_info "Recompiling libraw"

View File

@@ -40,7 +40,6 @@ function update_script() {
create_backup /opt/koffan/data
CLEAN_INSTALL=1 fetch_and_deploy_gh_release "koffan" "PanSalut/Koffan" "tarball"
GO_VERSION="$(grep -m1 '^go ' /opt/koffan/go.mod | awk '{print $2}')" setup_go
restore_backup
msg_info "Rebuilding Koffan"

View File

@@ -40,7 +40,6 @@ function update_script() {
create_backup /opt/localagi/.env
CLEAN_INSTALL=1 fetch_and_deploy_gh_release "localagi" "mudler/LocalAGI" "tarball" "latest" "/opt/localagi"
GO_VERSION="$(grep -m1 '^go ' /opt/localagi/go.mod | awk '{print $2}')" setup_go
restore_backup
msg_info "Building LocalAGI"

View File

@@ -39,7 +39,6 @@ function update_script() {
create_backup /opt/networkoptimizer/networkoptimizer.env
CLEAN_INSTALL=1 fetch_and_deploy_gh_release "networkoptimizer" "Ozark-Connect/NetworkOptimizer" "tarball"
GO_VERSION="$(grep -m1 '^go ' /opt/networkoptimizer/src/uwnspeedtest/go.mod | awk '{print $2}')" setup_go
restore_backup
msg_info "Rebuilding NetworkOptimizer"

View File

@@ -41,7 +41,6 @@ function update_script() {
fi
fetch_and_deploy_gh_release "paperless-gpt" "icereed/paperless-gpt" "tarball"
GO_VERSION="$(grep -m1 '^go ' /opt/paperless-gpt/go.mod | awk '{print $2}')" setup_go
msg_info "Updating Paperless-GPT"
cd /opt/paperless-gpt/web-app

View File

@@ -51,7 +51,6 @@ function update_script() {
/opt/romm/frontend/dist/assets/ruffle
CLEAN_INSTALL=1 fetch_and_deploy_gh_release "romm" "rommapp/romm" "tarball" "latest" "/opt/romm"
echo "__version__ = \"$(cat ~/.romm)\"" >/opt/romm/backend/__version__.py
find /opt/romm/backend/alembic/versions -maxdepth 1 -type f -name '1.*.py' -delete 2>/dev/null || true
find /opt/romm/backend/alembic/versions -maxdepth 1 -type f -name '2.0.0_.py' -delete 2>/dev/null || true
@@ -66,7 +65,7 @@ function update_script() {
$STD uv run alembic upgrade head
if [[ -f /opt/romm/backend/utils/rom_patcher/package.json ]]; then
cd /opt/romm/backend/utils/rom_patcher
$STD npm install --ignore-scripts --no-audit --no-fund --allow-git=all
$STD npm install --ignore-scripts --no-audit --no-fund
if [[ -d node_modules/rom-patcher/rom-patcher-js ]]; then
rm -rf rom-patcher-js
cp -r node_modules/rom-patcher/rom-patcher-js ./rom-patcher-js

View File

@@ -44,7 +44,6 @@ function update_script() {
msg_ok "Stopped Service"
CLEAN_INSTALL=1 GITLAB_URL="https://gitlab.torproject.org" fetch_and_deploy_gl_release "tor-snowflake" "tpo/anti-censorship/pluggable-transports/snowflake" "tarball"
GO_VERSION="$(grep -m1 '^go ' /opt/tor-snowflake/proxy/go.mod | awk '{print $2}')" setup_go
msg_info "Building Snowflake"
cd /opt/tor-snowflake/proxy

View File

@@ -158,8 +158,6 @@ EOF
CLEAN_INSTALL=1 fetch_and_deploy_gh_release "wanderer" "open-wanderer/wanderer" "tarball" "latest"
restore_backup
GO_VERSION="$(grep -m1 '^go ' /opt/wanderer/db/go.mod | awk '{print $2}')" setup_go
msg_info "Updating wanderer"
cd /opt/wanderer/db
$STD go mod tidy

View File

@@ -40,7 +40,6 @@ function update_script() {
create_backup /opt/watcharr/server/data
CLEAN_INSTALL=1 fetch_and_deploy_gh_release "watcharr" "sbondCo/Watcharr" "tarball"
GO_VERSION="$(grep -m1 '^go ' /opt/watcharr/server/go.mod | awk '{print $2}')" setup_go
restore_backup
msg_info "Updating Watcharr"

View File

@@ -38,7 +38,6 @@ function update_script() {
msg_ok "Stopped Service"
CLEAN_INSTALL=1 fetch_and_deploy_gh_release "yopass" "jhaals/yopass" "tarball"
GO_VERSION="$(grep -m1 '^go ' /opt/yopass/go.mod | awk '{print $2}')" setup_go
msg_info "Building Yopass"
cd /opt/yopass

View File

@@ -52,6 +52,7 @@ msg_ok "Installed Dependencies"
NODE_VERSION="26" NODE_MODULE=pnpm@11 setup_nodejs
setup_yq
setup_go
RUST_PROFILE="minimal" RUST_TOOLCHAIN="stable" setup_rust
UV_PYTHON_INSTALL_DIR="/usr/local/bin" PYTHON_VERSION="3.14.7" setup_uv
PG_VERSION="17" setup_postgresql
@@ -61,7 +62,6 @@ XMLSEC_VERSION="1.3.12"
AUTHENTIK_VERSION="version/2026.8.1"
fetch_and_deploy_gh_release "xmlsec" "lsh123/xmlsec" "tarball" "${XMLSEC_VERSION}" "/opt/xmlsec"
fetch_and_deploy_gh_release "authentik" "goauthentik/authentik" "tarball" "${AUTHENTIK_VERSION}" "/opt/authentik"
GO_VERSION="$(grep -m1 '^go ' /opt/authentik/go.mod | awk '{print $2}')" setup_go
fetch_and_deploy_gh_release "geoipupdate" "maxmind/geoipupdate" "binary"
msg_info "Setting up xmlsec"

View File

@@ -23,9 +23,9 @@ setup_deb_based() {
PG_VERSION="16" setup_postgresql
PG_DB_NAME="bitmagnet" PG_DB_USER="bitmagnet" setup_postgresql_db
setup_go
fetch_and_deploy_gh_release "bitmagnet" "bitmagnet-io/bitmagnet" "tarball"
GO_VERSION="$(grep -m1 '^go ' /opt/bitmagnet/go.mod | awk '{print $2}')" setup_go
RELEASE=$(cat ~/.bitmagnet)
msg_info "Configuring bitmagnet"

View File

@@ -51,8 +51,8 @@ while true; do
done
msg_ok "Configured Application"
setup_go
fetch_and_deploy_gh_release "cloudflare-ddns" "favonia/cloudflare-ddns" "tarball"
GO_VERSION="$(grep -m1 '^go ' /opt/cloudflare-ddns/go.mod | awk '{print $2}')" setup_go
msg_info "Building ${APPLICATION}"
cd /opt/cloudflare-ddns

View File

@@ -22,6 +22,7 @@ $STD apt install -y \
msg_ok "Installed Dependencies"
PG_VERSION="17" setup_postgresql
setup_go
NODE_VERSION="24" NODE_MODULE="corepack" setup_nodejs
msg_info "Installing Database Clients"
@@ -51,7 +52,6 @@ done
msg_ok "Installed Database Clients"
fetch_and_deploy_gh_release "databasus" "databasus/databasus" "tarball" "latest" "/opt/databasus"
GO_VERSION="$(grep -m1 '^go ' /opt/databasus/backend/go.mod | awk '{print $2}')" setup_go
msg_info "Building Databasus (Patience)"
export COREPACK_ENABLE_DOWNLOAD_PROMPT=0

View File

@@ -28,11 +28,11 @@ $STD apt install -y \
msg_ok "Installed Dependencies"
NODE_VERSION="22" NODE_MODULE="pnpm@11.4.0" setup_nodejs
setup_go
RUST_PROFILE="minimal" setup_rust
PG_VERSION="17" PG_MODULES="cron" setup_postgresql
fetch_and_deploy_gh_release "firecrawl" "firecrawl/firecrawl" "tarball" "latest" "/opt/firecrawl"
GO_VERSION="$(grep -m1 '^go ' /opt/firecrawl/apps/api/sharedLibs/go-html-to-md/go.mod | awk '{print $2}')" setup_go
msg_info "Configuring FDB"
FDB_VERSION="$(awk -F= '/^ARG FDB_VERSION=/{print $2; exit}' /opt/firecrawl/apps/api/Dockerfile)"

View File

@@ -26,9 +26,9 @@ $STD update-alternatives --set ip6tables /usr/sbin/ip6tables-legacy
ln -sf /usr/sbin/openvpn /usr/sbin/openvpn2.6
msg_ok "Configured iptables"
setup_go
fetch_and_deploy_gh_release "gluetun" "qdm12/gluetun" "tarball"
GO_VERSION="$(grep -m1 '^go ' /opt/gluetun/go.mod | awk '{print $2}')" setup_go
msg_info "Building Gluetun"
cd /opt/gluetun

View File

@@ -266,7 +266,7 @@ msg_ok "(2/6) Compiled jpegli"
msg_info "(3/6) Compiling libheif"
SOURCE=${SOURCE_DIR}/libheif
LIBHEIF_REVISION="ac1cb05c39008f01525c991ff8b88f84ddf70fd2"
LIBHEIF_REVISION="62f1b8c76ed4d8305071fdacbe74ef9717bacac5"
# : "${LIBHEIF_REVISION:=$(jq -cr '.revision' $BASE_DIR/server/sources/libheif.json)}"
$STD git clone https://github.com/strukturag/libheif.git "$SOURCE"
cd "$SOURCE"
@@ -292,7 +292,7 @@ msg_ok "(3/6) Compiled libheif"
msg_info "(4/6) Compiling libraw"
SOURCE=${SOURCE_DIR}/libraw
LIBRAW_REVISION="e419de08001de28ae6988ecb22df47e52b9c5eaa"
LIBRAW_REVISION="b860248a89d9082b8e0a1e202e516f46af9adb29"
# : "${LIBRAW_REVISION:=$(jq -cr '.revision' $BASE_DIR/server/sources/libraw.json)}"
$STD git clone https://github.com/LibRaw/LibRaw.git "$SOURCE"
cd "$SOURCE"

View File

@@ -17,8 +17,8 @@ msg_info "Installing Dependencies"
$STD apt install -y build-essential
msg_ok "Installed Dependencies"
setup_go
fetch_and_deploy_gh_release "koffan" "PanSalut/Koffan" "tarball"
GO_VERSION="$(grep -m1 '^go ' /opt/koffan/go.mod | awk '{print $2}')" setup_go
msg_info "Building Koffan"
cd /opt/koffan

View File

@@ -19,6 +19,7 @@ $STD apt install -y build-essential
msg_ok "Installed Dependencies"
NODE_VERSION="24" setup_nodejs
setup_go
msg_info "Installing Bun"
export BUN_INSTALL="/root/.bun"
@@ -28,7 +29,6 @@ ln -sf /root/.bun/bin/bunx /usr/local/bin/bunx
msg_ok "Installed Bun"
fetch_and_deploy_gh_release "localagi" "mudler/LocalAGI" "tarball" "latest" "/opt/localagi"
GO_VERSION="$(grep -m1 '^go ' /opt/localagi/go.mod | awk '{print $2}')" setup_go
msg_info "Configuring LocalAGI"
mkdir -p /opt/localagi/pool

View File

@@ -48,9 +48,9 @@ $STD apt install -y \
msg_ok "Installed Build Dependencies"
NODE_VERSION="22" setup_nodejs
setup_go
fetch_and_deploy_gh_release "neko" "m1k1o/neko" "tarball"
GO_VERSION="$(grep -m1 '^go ' /opt/neko/server/go.mod | awk '{print $2}')" setup_go
msg_info "Building Client"
cd /opt/neko/client

View File

@@ -27,9 +27,9 @@ setup_deb822_repo \
$STD apt install -y dotnet-sdk-10.0
msg_ok "Installed Dependencies"
setup_go
fetch_and_deploy_gh_release "networkoptimizer" "Ozark-Connect/NetworkOptimizer" "tarball"
GO_VERSION="$(grep -m1 '^go ' /opt/networkoptimizer/src/uwnspeedtest/go.mod | awk '{print $2}')" setup_go
msg_info "Building NetworkOptimizer"
RID="linux-x64"

View File

@@ -23,8 +23,8 @@ $STD apt install -y \
msg_ok "Installed Dependencies"
NODE_VERSION="24" setup_nodejs
setup_go
fetch_and_deploy_gh_release "paperless-gpt" "icereed/paperless-gpt" "tarball"
GO_VERSION="$(grep -m1 '^go ' /opt/paperless-gpt/go.mod | awk '{print $2}')" setup_go
msg_info "Setup Paperless-GPT"
cd /opt/paperless-gpt/web-app

View File

@@ -161,7 +161,6 @@ else
fi
fetch_and_deploy_gh_release "romm" "rommapp/romm" "tarball"
echo "__version__ = \"$(cat ~/.romm)\"" >/opt/romm/backend/__version__.py
msg_info "Creating environment file"
sed -i 's/^supervised no/supervised systemd/' /etc/redis/redis.conf
@@ -215,7 +214,7 @@ msg_ok "Set up RomM Backend"
if [[ -f /opt/romm/backend/utils/rom_patcher/package.json ]]; then
msg_info "Building ROM Patcher helper"
cd /opt/romm/backend/utils/rom_patcher
$STD npm install --ignore-scripts --no-audit --no-fund --allow-git=all
$STD npm install --ignore-scripts --no-audit --no-fund
if [[ -d node_modules/rom-patcher/rom-patcher-js ]]; then
rm -rf rom-patcher-js
cp -r node_modules/rom-patcher/rom-patcher-js ./rom-patcher-js

View File

@@ -19,9 +19,9 @@ $STD apt install -y \
gcc
msg_ok "Installed Dependencies"
setup_go
NODE_VERSION="22" setup_nodejs
fetch_and_deploy_gh_release "seelf" "YuukanOO/seelf" "tarball"
GO_VERSION="$(grep -m1 '^go ' /opt/seelf/go.mod | awk '{print $2}')" setup_go
msg_info "Setting up seelf. Patience"
cd /opt/seelf

View File

@@ -13,10 +13,10 @@ setting_up_container
network_check
update_os
setup_go
msg_info "Building Snowflake"
GITLAB_URL="https://gitlab.torproject.org" fetch_and_deploy_gl_release "tor-snowflake" "tpo/anti-censorship/pluggable-transports/snowflake" "tarball"
GO_VERSION="$(grep -m1 '^go ' /opt/tor-snowflake/proxy/go.mod | awk '{print $2}')" setup_go
cd /opt/tor-snowflake/proxy
$STD go build -o snowflake-proxy .
msg_ok "Built Snowflake Proxy"

View File

@@ -13,6 +13,7 @@ setting_up_container
network_check
update_os
setup_go
NODE_VERSION="22" setup_nodejs
mkdir -p /opt/{wanderer,wanderer_data/pb_data,wanderer_data/meili_data,wanderer_data/plugins}
MEILISEARCH_DB_PATH="/opt/wanderer_data/meili_data" setup_meilisearch
@@ -20,8 +21,6 @@ fetch_and_deploy_gh_release "wanderer" "open-wanderer/wanderer" "tarball" "lates
mkdir -p /opt/wanderer/db/data
[[ -e /opt/wanderer/db/data/plugins ]] || ln -sfn /opt/wanderer_data/plugins /opt/wanderer/db/data/plugins
GO_VERSION="$(grep -m1 '^go ' /opt/wanderer/db/go.mod | awk '{print $2}')" setup_go
msg_info "Installing wanderer (patience)"
cd /opt/wanderer/db
$STD go mod tidy

View File

@@ -17,9 +17,9 @@ msg_info "Installing Dependencies"
$STD apt install -y gcc
msg_ok "Installed Dependencies"
setup_go
NODE_VERSION="24" setup_nodejs
fetch_and_deploy_gh_release "watcharr" "sbondCo/Watcharr" "tarball"
GO_VERSION="$(grep -m1 '^go ' /opt/watcharr/server/go.mod | awk '{print $2}')" setup_go
msg_info "Setup Watcharr"
cd /opt/watcharr

View File

@@ -18,10 +18,10 @@ $STD apt install -y redis-server
systemctl enable -q --now redis-server
msg_ok "Installed Dependencies"
setup_go
NODE_VERSION="22" NODE_MODULE="yarn" setup_nodejs
fetch_and_deploy_gh_release "yopass" "jhaals/yopass" "tarball"
GO_VERSION="$(grep -m1 '^go ' /opt/yopass/go.mod | awk '{print $2}')" setup_go
msg_info "Building Yopass"
cd /opt/yopass

View File

@@ -155,13 +155,29 @@ function sanitize_service_name() {
return 0
}
function validate_service_script() {
function script_exists() {
local name="$1"
sanitize_service_name "$name" || return 1
curl -fsSL --max-time 10 -o /dev/null \
"https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/ct/${name}.sh" 2>/dev/null
}
# A container keeps the slug it was built with, so a renamed ct/ script leaves it
# pointing at a name that no longer exists. Try the successors, but only accept one
# that is really there -- guessing wrong would run a foreign app's updater.
function resolve_service_script() {
local n="$1" c
script_exists "$n" && { printf '%s' "$n"; return 0; }
for c in "${n#alpine-}" "$(printf '%s' "$n" | sed -E 's/-v[0-9]+$//')"; do
[[ -n "$c" && "$c" != "$n" ]] || continue
script_exists "$c" && { printf '%s' "$c"; return 0; }
done
case "$n" in
pbs) script_exists proxmox-backup-server && { printf '%s' proxmox-backup-server; return 0; } ;;
esac
return 1
}
function detect_service() {
local container="$1"
local tmpdir update_file
@@ -484,12 +500,18 @@ for container in $CHOICE; do
continue
fi
if ! validate_service_script "${service}"; then
resolved_service="$(resolve_service_script "${service}")"
if [ -z "${resolved_service}" ]; then
echo -e "${RD}[ERROR]${CL} Service '${service}' does not resolve to ct/${service}.sh"
log_result "$container" "${service}" "ERROR" "No matching ct/${service}.sh script found"
log_write "Container $container: ERROR — ct/${service}.sh not found"
continue
fi
if [ "${resolved_service}" != "${service}" ]; then
echo -e "${BL}[INFO]${CL} Script was renamed: ${service} -> ${GN}${resolved_service}${CL}"
log_write "Container $container: slug ${service} resolved to ${resolved_service}"
service="${resolved_service}"
fi
echo -e "${BL}[INFO]${CL} Detected service: ${GN}${service}${CL}"
log_write "Container $container: detected service '${service}'"