VErsion 3.3.0p3

This commit is contained in:
2025-11-21 14:27:53 +01:00
parent 3f67a6995d
commit dbcc1ab607
8 changed files with 522 additions and 0 deletions

44
acme_wrapper.sh Executable file
View File

@@ -0,0 +1,44 @@
#!/bin/bash
# --- FÜHRT DIE BEFEHLE VOR DER ACME-ERSTELLUNG AUS (Proxy OFF) ---
stop_challenge() {
echo "Stopping normal proxy operation and preparing for ACME challenge (Proxy OFF)..."
a2disconf 10-remoteip-proxyproto.conf
a2enconf 10-remoteip-proxyproto-off.conf
systemctl reload apache2
echo "Preparation complete."
}
# --- FÜHRT DIE BEFEHLE NACH DER ACME-ERSTELLUNG AUS (Proxy ON) ---
start_normal() {
echo "Starting normal proxy operation after ACME challenge (Proxy ON)..."
a2disconf 10-remoteip-proxyproto-off.conf
a2enconf 10-remoteip-proxyproto.conf
systemctl reload apache2
echo "Normal operation restored."
}
case "$1" in
stop)
# Führt die Befehle VOR der Zertifikatserstellung aus
stop_challenge
;;
start)
# Führt die Befehle NACH der Zertifikatserstellung aus
start_normal
;;
*)
# Fallback: Führt das komplette Skript wie ursprünglich aus
echo "Usage: $0 {stop|start|full}"
echo "Defaulting to full run for compatibility."
stop_challenge
echo ""
echo "--- Executing ACME Certificate Renewal ---"
/usr/bin/certbot renew --no-self-upgrade
/root/.acme.sh/acme.sh --cron --force --home /root/.acme.sh
start_normal
;;
esac