mirror of
https://github.com/community-scripts/ProxmoxVE.git
synced 2026-09-22 20:27:19 +02:00
Fix Nginx Proxy Manager for Debian 13 Trixie
- Detect Debian version dynamically from /etc/os-release - Replace hardcoded 'bookworm' with VERSION_CODENAME in openresty sources - Fixes both install and update_script() functions - Ensures openresty repository matches container's Debian version Fixes: Nginx Proxy Manager update fails on Debian 13 with 404 errors Previously: Only worked on Debian 12 Bookworm due to hardcoded suite name
This commit is contained in:
@@ -157,13 +157,16 @@ EOF
|
|||||||
[ -f /etc/apt/trusted.gpg.d/openresty-archive-keyring.gpg ] && rm -f /etc/apt/trusted.gpg.d/openresty-archive-keyring.gpg
|
[ -f /etc/apt/trusted.gpg.d/openresty-archive-keyring.gpg ] && rm -f /etc/apt/trusted.gpg.d/openresty-archive-keyring.gpg
|
||||||
[ -f /etc/apt/sources.list.d/openresty.list ] && rm -f /etc/apt/sources.list.d/openresty.list
|
[ -f /etc/apt/sources.list.d/openresty.list ] && rm -f /etc/apt/sources.list.d/openresty.list
|
||||||
[ ! -f /etc/apt/trusted.gpg.d/openresty.gpg ] && curl -fsSL https://openresty.org/package/pubkey.gpg | gpg --dearmor --yes -o /etc/apt/trusted.gpg.d/openresty.gpg
|
[ ! -f /etc/apt/trusted.gpg.d/openresty.gpg ] && curl -fsSL https://openresty.org/package/pubkey.gpg | gpg --dearmor --yes -o /etc/apt/trusted.gpg.d/openresty.gpg
|
||||||
[ ! -f /etc/apt/sources.list.d/openresty.sources ] && cat <<'EOF' >/etc/apt/sources.list.d/openresty.sources
|
if [ ! -f /etc/apt/sources.list.d/openresty.sources ]; then
|
||||||
|
DEBIAN_VERSION=$(grep -E '^VERSION_CODENAME=' /etc/os-release | cut -d'=' -f2)
|
||||||
|
cat <<EOF >/etc/apt/sources.list.d/openresty.sources
|
||||||
Types: deb
|
Types: deb
|
||||||
URIs: http://openresty.org/package/debian/
|
URIs: http://openresty.org/package/debian/
|
||||||
Suites: bookworm
|
Suites: ${DEBIAN_VERSION}
|
||||||
Components: openresty
|
Components: openresty
|
||||||
Signed-By: /etc/apt/trusted.gpg.d/openresty.gpg
|
Signed-By: /etc/apt/trusted.gpg.d/openresty.gpg
|
||||||
EOF
|
EOF
|
||||||
|
fi
|
||||||
$STD apt update
|
$STD apt update
|
||||||
$STD apt -y install openresty
|
$STD apt -y install openresty
|
||||||
if [ -d /opt/certbot ]; then
|
if [ -d /opt/certbot ]; then
|
||||||
|
|||||||
@@ -41,10 +41,11 @@ msg_ok "Set up Certbot"
|
|||||||
|
|
||||||
msg_info "Installing Openresty"
|
msg_info "Installing Openresty"
|
||||||
curl -fsSL "https://openresty.org/package/pubkey.gpg" | gpg --dearmor -o /etc/apt/trusted.gpg.d/openresty.gpg
|
curl -fsSL "https://openresty.org/package/pubkey.gpg" | gpg --dearmor -o /etc/apt/trusted.gpg.d/openresty.gpg
|
||||||
cat <<'EOF' >/etc/apt/sources.list.d/openresty.sources
|
DEBIAN_VERSION=$(grep -E '^VERSION_CODENAME=' /etc/os-release | cut -d'=' -f2)
|
||||||
|
cat <<EOF >/etc/apt/sources.list.d/openresty.sources
|
||||||
Types: deb
|
Types: deb
|
||||||
URIs: http://openresty.org/package/debian/
|
URIs: http://openresty.org/package/debian/
|
||||||
Suites: bookworm
|
Suites: ${DEBIAN_VERSION}
|
||||||
Components: openresty
|
Components: openresty
|
||||||
Signed-By: /etc/apt/trusted.gpg.d/openresty.gpg
|
Signed-By: /etc/apt/trusted.gpg.d/openresty.gpg
|
||||||
EOF
|
EOF
|
||||||
|
|||||||
Reference in New Issue
Block a user