From 2b0bf5869cb09581d4c0cd666dd285556c47f4c2 Mon Sep 17 00:00:00 2001 From: Eric Nemchik Date: Fri, 28 Jul 2023 18:59:20 +0000 Subject: [PATCH] Fix removing ini values - missing -i flag - use word boundary instead of space Signed-off-by: GitHub --- root/etc/s6-overlay/s6-rc.d/init-certbot-config/run | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/root/etc/s6-overlay/s6-rc.d/init-certbot-config/run b/root/etc/s6-overlay/s6-rc.d/init-certbot-config/run index bb4d699..6d33344 100755 --- a/root/etc/s6-overlay/s6-rc.d/init-certbot-config/run +++ b/root/etc/s6-overlay/s6-rc.d/init-certbot-config/run @@ -294,17 +294,17 @@ if [[ "${VALIDATION}" = "dns" ]]; then # plugins that don't support setting credentials file if [[ "${DNSPLUGIN}" =~ ^(route53|standalone)$ ]]; then - sed "/^dns-${DNSPLUGIN}-credentials /d" /config/etc/letsencrypt/cli.ini + sed -i "/^dns-${DNSPLUGIN}-credentials\b/d" /config/etc/letsencrypt/cli.ini fi # plugins that don't support setting propagation if [[ "${DNSPLUGIN}" =~ ^(azure|gandi|route53|standalone)$ ]]; then if [[ -n "${PROPAGATION}" ]]; then echo "${DNSPLUGIN} dns plugin does not support setting propagation time"; fi - sed "/^dns-${DNSPLUGIN}-propagation-seconds /d" /config/etc/letsencrypt/cli.ini + sed -i "/^dns-${DNSPLUGIN}-propagation-seconds\b/d" /config/etc/letsencrypt/cli.ini fi # plugins that use old parameter naming convention if [[ "${DNSPLUGIN}" =~ ^(cpanel|directadmin)$ ]]; then - sed "/^dns-${DNSPLUGIN}-credentials /d" /config/etc/letsencrypt/cli.ini - sed "/^dns-${DNSPLUGIN}-propagation-seconds /d" /config/etc/letsencrypt/cli.ini + sed -i "/^dns-${DNSPLUGIN}-credentials\b/d" /config/etc/letsencrypt/cli.ini + sed -i "/^dns-${DNSPLUGIN}-propagation-seconds\b/d" /config/etc/letsencrypt/cli.ini set_ini_value "authenticator" "${DNSPLUGIN}" /config/etc/letsencrypt/cli.ini set_ini_value "${DNSPLUGIN}-credentials" "${DNSCREDENTIALFILE}" /config/etc/letsencrypt/cli.ini if [[ -n "${PROPAGATION}" ]]; then set_ini_value "${DNSPLUGIN}-propagation-seconds" "${PROPAGATION}" /config/etc/letsencrypt/cli.ini; fi