From 37a776605bab8cdf0afbe4951de438cbafa61b46 Mon Sep 17 00:00:00 2001 From: Paul Buetow Date: Sat, 31 Jan 2026 17:51:06 +0200 Subject: Fix acme.sh to handle f3s host server blocks with -port80/-port8080 suffixes Changes grep from exact match (^server "") to prefix match (^server ") This allows acme.sh to find and generate certificates for f3s cluster hosts. Amp-Thread-ID: https://ampcode.com/threads/T-019c14ac-164f-776f-8648-471d4ac4ce5a Co-authored-by: Amp --- frontends/scripts/acme.sh.tpl | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'frontends/scripts') diff --git a/frontends/scripts/acme.sh.tpl b/frontends/scripts/acme.sh.tpl index cd6e4cc..b3301fa 100644 --- a/frontends/scripts/acme.sh.tpl +++ b/frontends/scripts/acme.sh.tpl @@ -20,8 +20,7 @@ handle_cert () { host=$1 host_ip=`host $host | awk '/has address/ { print $(NF) }'` - # Check for server block, accounting for f3s hosts which have -port80/-port8080 suffixes - grep -q "^server \"$host" /etc/httpd.conf + grep -q "^server \"$host\"" /etc/httpd.conf if [ $? -ne 0 ]; then echo "Host $host not configured in httpd, skipping..." return -- cgit v1.2.3