mirror of
https://github.com/community-scripts/ProxmoxVE.git
synced 2026-02-03 20:03:25 +01:00
Compare commits
5 Commits
2026-01-26
...
certbot_np
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
6f358d7e5d | ||
|
|
e44a8e8af8 | ||
|
|
b42f9fabe1 | ||
|
|
259f14b8e9 | ||
|
|
0fb5fc5ce0 |
@@ -157,18 +157,39 @@ 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/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/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)
|
||||
# Openresty only has bookworm, not trixie - map newer versions to bookworm
|
||||
case "$DEBIAN_VERSION" in
|
||||
trixie|sid) OPENRESTY_SUITE="bookworm" ;;
|
||||
*) OPENRESTY_SUITE="$DEBIAN_VERSION" ;;
|
||||
esac
|
||||
cat <<EOF >/etc/apt/sources.list.d/openresty.sources
|
||||
Types: deb
|
||||
URIs: http://openresty.org/package/debian/
|
||||
Suites: bookworm
|
||||
Suites: ${OPENRESTY_SUITE}
|
||||
Components: openresty
|
||||
Signed-By: /etc/apt/trusted.gpg.d/openresty.gpg
|
||||
EOF
|
||||
fi
|
||||
$STD apt update
|
||||
$STD apt -y install openresty
|
||||
if [ -d /opt/certbot ]; then
|
||||
$STD /opt/certbot/bin/pip install --upgrade pip setuptools wheel
|
||||
$STD /opt/certbot/bin/pip install --upgrade certbot certbot-dns-cloudflare
|
||||
|
||||
# Fix for Debian 13 Trixie - certbot-dns-multi needed to prevent "API isn't healthy" error
|
||||
if [[ $(grep -E '^VERSION_ID=' /etc/os-release) == *"13"* ]]; then
|
||||
if ! /opt/certbot/bin/pip list 2>/dev/null | grep -q certbot-dns-multi; then
|
||||
msg_info "Applying Debian 13 Certbot Fix"
|
||||
$STD apt-get install -y golang build-essential git
|
||||
$STD /opt/certbot/bin/pip install --no-cache-dir setuptools-golang==2.9.0
|
||||
export CGO_ENABLED=1
|
||||
export GO111MODULE=on
|
||||
$STD /opt/certbot/bin/pip install --no-build-isolation --no-cache-dir certbot-dns-multi
|
||||
msg_ok "Applied Debian 13 Certbot Fix"
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
msg_ok "Updated Certbot"
|
||||
|
||||
|
||||
@@ -28,6 +28,15 @@ function update_script() {
|
||||
exit
|
||||
fi
|
||||
|
||||
# Enable PostGIS extension if not already enabled
|
||||
if systemctl is-active --quiet postgresql; then
|
||||
if ! sudo -u postgres psql -d reitti -tAc "SELECT 1 FROM pg_extension WHERE extname='postgis'" 2>/dev/null | grep -q 1; then
|
||||
msg_info "Enabling PostGIS extension"
|
||||
sudo -u postgres psql -d reitti -c "CREATE EXTENSION IF NOT EXISTS postgis;" &>/dev/null
|
||||
msg_ok "Enabled PostGIS extension"
|
||||
fi
|
||||
fi
|
||||
|
||||
if [ ! -d /var/cache/nginx/tiles ]; then
|
||||
msg_info "Installing Nginx Tile Cache"
|
||||
mkdir -p /var/cache/nginx/tiles
|
||||
|
||||
@@ -36,15 +36,35 @@ msg_info "Setting up Certbot"
|
||||
$STD python3 -m venv /opt/certbot
|
||||
$STD /opt/certbot/bin/pip install --upgrade pip setuptools wheel
|
||||
$STD /opt/certbot/bin/pip install certbot certbot-dns-cloudflare
|
||||
|
||||
# Fix for Debian 13 Trixie - certbot-dns-multi needed to prevent "API isn't healthy" error
|
||||
if [[ $(grep -E '^VERSION_ID=' /etc/os-release) == *"13"* ]]; then
|
||||
if ! /opt/certbot/bin/pip list 2>/dev/null | grep -q certbot-dns-multi; then
|
||||
msg_info "Applying Debian 13 Certbot Fix"
|
||||
$STD apt-get install -y golang build-essential git
|
||||
$STD /opt/certbot/bin/pip install --no-cache-dir setuptools-golang==2.9.0
|
||||
export CGO_ENABLED=1
|
||||
export GO111MODULE=on
|
||||
$STD /opt/certbot/bin/pip install --no-build-isolation --no-cache-dir certbot-dns-multi
|
||||
msg_ok "Applied Debian 13 Certbot Fix"
|
||||
fi
|
||||
fi
|
||||
|
||||
ln -sf /opt/certbot/bin/certbot /usr/local/bin/certbot
|
||||
msg_ok "Set up Certbot"
|
||||
|
||||
msg_info "Installing Openresty"
|
||||
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)
|
||||
# Openresty only has bookworm, not trixie - map newer versions to bookworm
|
||||
case "$DEBIAN_VERSION" in
|
||||
trixie|sid) OPENRESTY_SUITE="bookworm" ;;
|
||||
*) OPENRESTY_SUITE="$DEBIAN_VERSION" ;;
|
||||
esac
|
||||
cat <<EOF >/etc/apt/sources.list.d/openresty.sources
|
||||
Types: deb
|
||||
URIs: http://openresty.org/package/debian/
|
||||
Suites: bookworm
|
||||
Suites: ${OPENRESTY_SUITE}
|
||||
Components: openresty
|
||||
Signed-By: /etc/apt/trusted.gpg.d/openresty.gpg
|
||||
EOF
|
||||
|
||||
Reference in New Issue
Block a user