From 22065c3a74024341bc850d86f8e0d3e1334bb90e Mon Sep 17 00:00:00 2001
From: "Hahn Axel (hahn)" <axel.hahn@unibe.ch>
Date: Wed, 8 Jan 2025 13:29:20 +0100
Subject: [PATCH] update text output

---
 cm.sh | 14 ++++++++------
 1 file changed, 8 insertions(+), 6 deletions(-)

diff --git a/cm.sh b/cm.sh
index 7ea28f9..0233cd7 100755
--- a/cm.sh
+++ b/cm.sh
@@ -578,6 +578,11 @@ function public_add(){
 
     local iCounter
     typeset -i iCounter=0
+
+    _wd "--- create output dir $dircerts"
+    mkdir -p "${CM_dircerts}" 2>/dev/null
+
+    _wd "--- issue certificate"
     for _mydomain in $CM_fqdn $*
     do
         iCounter+=1
@@ -585,7 +590,7 @@ function public_add(){
 
         if [ -n "$CM_webroot" ]
         then
-            echo "WEBROOT found"
+            echo "INFO: Using http request on port 80 as challenge; put file into $CM_webroot"
             if [ $iCounter -eq 1 ]
             then
                 _params+="-w $CM_webroot "
@@ -593,6 +598,7 @@ function public_add(){
         else
             if [ -n "${CM_challenge_alias}" ]
             then
+                echo "INFO: Using DNS for challenge"
                 _params+=" --challenge-alias "
                 if ! echo "$_mydomain" | grep "${CM_certmatch}" >/dev/null 
                 then
@@ -607,10 +613,6 @@ function public_add(){
     # 2023-05-08: Specifies the domain key length
     _params+="--keylength 2048 "
 
-    _wd "--- create output dir $dircerts"
-    mkdir -p "${CM_dircerts}" 2>/dev/null
-
-    _wd "--- create certificate"
     echo "$ACME --issue $_params $ACME_Params"
     if ! $ACME --issue $_params $ACME_Params 
     then
@@ -929,7 +931,7 @@ cat <<ENDOFHEADER
 $line
 
 
-                - - - ---===>>> CERT MANAGER - v$_version <<<===--- - - -
+          - - - ---===>>> CERT MANAGER - v$_version <<<===--- - - -
 
 $line
 
-- 
GitLab