From 3b98b3ae65791b3014d7d21747568e00ee37dc98 Mon Sep 17 00:00:00 2001 From: thespad Date: Tue, 7 Jan 2025 10:15:27 +0000 Subject: [PATCH] Simplify --- root/migrations/02-swag-old-certbot-paths | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/root/migrations/02-swag-old-certbot-paths b/root/migrations/02-swag-old-certbot-paths index 20a2a1b..669533c 100755 --- a/root/migrations/02-swag-old-certbot-paths +++ b/root/migrations/02-swag-old-certbot-paths @@ -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