docker-swag/root/migrations/02-swag-old-certbot-paths

8 lines
436 B
Plaintext
Raw Normal View History

#!/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
2025-01-06 17:51:07 +00:00
sed -i 's| /etc/letsencrypt| /config/etc/letsencrypt|' /config/etc/letsencrypt/renewal/*.conf && touch /config/etc/letsencrypt/02-swag-old-certbot-paths
fi