From: William Lallemand Date: Mon, 4 Dec 2023 10:52:31 +0000 (+0100) Subject: MINOR: acme.sh: don't use '*' in the filename for wildcard domain X-Git-Tag: v2.9.0~14 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=37b31b2f4de8dba4b80b9ed096ea0d4afdeef2b1;p=thirdparty%2Fhaproxy.git MINOR: acme.sh: don't use '*' in the filename for wildcard domain By default acme.sh uses the '*' character in the filename for wildcard. That can be confusing within HAProxy since the * character in front of a filename in the stat socket is used to specified an uncommitted transaction. This patch replace the '*' by a '_' in the filename. This is only done when using the default filename, the name can still be forced with an asterisk. --- diff --git a/admin/acme.sh/haproxy.sh b/admin/acme.sh/haproxy.sh index ef7fe45e3e..4b6ca0e1f1 100644 --- a/admin/acme.sh/haproxy.sh +++ b/admin/acme.sh/haproxy.sh @@ -102,6 +102,11 @@ haproxy_deploy() { _savedomainconf Le_Deploy_haproxy_pem_name "${Le_Deploy_haproxy_pem_name}" elif [ -z "${Le_Deploy_haproxy_pem_name}" ]; then Le_Deploy_haproxy_pem_name="${DEPLOY_HAPROXY_PEM_NAME_DEFAULT}" + # We better not have '*' as the first character + if [ "${Le_Deploy_haproxy_pem_name%%"${Le_Deploy_haproxy_pem_name#?}"}" = '*' ]; then + # removes the first characters and add a _ instead + Le_Deploy_haproxy_pem_name="_${Le_Deploy_haproxy_pem_name#?}" + fi fi # BUNDLE is optional. If not provided then assume "${DEPLOY_HAPROXY_BUNDLE_DEFAULT}"