This commit is contained in:
thespad 2025-01-07 10:15:27 +00:00
parent af6a3a2163
commit 3b98b3ae65
No known key found for this signature in database

View File

@ -1,7 +1,7 @@
#!/usr/bin/with-contenv bash
# shellcheck shell=bash
# Migrate existing confs with old paths from /etc/letsencrypt to /config/etc/letsencrypt
if [[ ! -f "/config/etc/letsencrypt/02-swag-old-certbot-paths" ]] && ls /config/etc/letsencrypt/renewal/*.conf >/dev/null 2>&1; then
sed -i 's| /etc/letsencrypt| /config/etc/letsencrypt|' /config/etc/letsencrypt/renewal/*.conf && touch /config/etc/letsencrypt/02-swag-old-certbot-paths
# Migrate existing renewal confs with old paths from /etc/letsencrypt to /config/etc/letsencrypt
if ls /config/etc/letsencrypt/renewal/*.conf >/dev/null 2>&1; then
sed -i 's| /etc/letsencrypt| /config/etc/letsencrypt|' /config/etc/letsencrypt/renewal/*.conf
fi