Skip to content
Snippets Groups Projects
Commit 73a3a6b5 authored by Hahn Axel (hahn)'s avatar Hahn Axel (hahn)
Browse files

mix multiple domains using domain alias or not

parent f3653bc4
No related branches found
No related tags found
1 merge request!13mix multiple domains using domain alias or not
......@@ -31,6 +31,7 @@
# 2022-04-04 <axel.hahn@iml.unibe.ch> added param "list-old"
# 2022-04-07 <axel.hahn@iml.unibe.ch> fix missing key in public_ensure before calling public_add too.
# 2022-04-20 <axel.hahn@iml.unibe.ch> fix multiple domains using domain alias
# 2022-04-21 <axel.hahn@iml.unibe.ch> mix multiple domains using domain alias or not
# ======================================================================
......@@ -406,11 +407,13 @@ function public_add(){
for _mydomain in $CM_fqdn $*
do
_params+="-d $_mydomain "
_params+="-d $_mydomain --challenge-alias "
if [ -n "${CM_challenge_alias}" ] && ! echo "$_mydomain" | grep "${CM_certmatch}" >/dev/null
then
_params+="--challenge-alias ${CM_challenge_alias} "
_params+="${CM_challenge_alias} "
else
_params+="no "
fi
done
......@@ -418,7 +421,7 @@ function public_add(){
mkdir -p "${CM_dircerts}" 2>/dev/null
_wd "--- create certificate"
echo $ACME --issue $_params $ACME_Params
echo "$ACME --issue $_params $ACME_Params"
if ! $ACME --issue $_params $ACME_Params
then
echo "ERROR: adding cert failed. Trying to delete internal data ..."
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment