#!/usr/bin/env bash set -euo pipefail source ./lib.sh install -d /etc/letsencrypt/renewal-hooks/deploy # --- 50: Symlink-Hook (setzt stabile /etc/ssl/{ui,webmail,mail}) --- cat >/etc/letsencrypt/renewal-hooks/deploy/50-mailwolt-symlinks.sh < \${le}" } link_if "${UI_HOST}" "\${UI_SSL_DIR}" link_if "${WEBMAIL_HOST}" "\${WEBMAIL_SSL_DIR}" link_if "${MX_HOST}" "\${MAIL_SSL_DIR}" systemctl reload nginx || true systemctl reload postfix dovecot || true HOOK chmod +x /etc/letsencrypt/renewal-hooks/deploy/50-mailwolt-symlinks.sh # --- 60: TLSA-Hook (bei jedem Renew für MX neu berechnen – falls Key doch rotiert) --- cat >/etc/letsencrypt/renewal-hooks/deploy/60-mailwolt-tlsa.sh < "/etc/mailwolt/dns/\${MX_HOST}.tlsa.txt" echo "[TLSA] \${TLSA_LINE}" fi HOOK chmod +x /etc/letsencrypt/renewal-hooks/deploy/60-mailwolt-tlsa.sh