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

Merge branch 'add-http-challenge' into 'master'

fix handling for issue with dns alias

See merge request !30
parents 908b8e67 671ec11a
No related branches found
No related tags found
1 merge request!30fix handling for issue with dns alias
......@@ -38,6 +38,7 @@
# 2023-05-08 <axel.hahn@unibe.ch> fix: "key and cert do not match"
# 2024-03-21 <axel.hahn@unibe.ch> shorter sleep times
# 2025-01-08 <axel.hahn@unibe.ch> support for http challenge on port 80; more params supported for force renew, http challenge
# 2025-01-09 <axel.hahn@unibe.ch> fix handling for issue with dns alias
# ======================================================================
......@@ -47,7 +48,7 @@
#
# ----------------------------------------------------------------------
_version="2025-01-08"
_version="2025-01-09"
logdir="./log"
touchfile="$logdir/lastchange.txt"
......@@ -246,7 +247,7 @@ function _dnsCheck(){
_wd "dig check - domain for cert"
_checkDig "$_mydomain" "a" "IN.*(A|CNAME)" # matches A and CNAME records
if [ -n "${CM_challenge_alias}" ] && ! echo "$_mydomain" | grep "${CM_certmatch}" >/dev/null
if [ -n "${CM_challenge_alias}" ] && ! echo "$_mydomain" | grep "${CM_challenge_alias}" >/dev/null
then
_wd "dig check - cname ${_subdomain}.${_mydomain} must exist"
_checkDig "${_subdomain}.${_mydomain}" "cname"
......@@ -603,12 +604,13 @@ 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
if ! echo "$_mydomain" | grep "${CM_challenge_alias}" >/dev/null
then
echo "INFO: Using DNS for challenge with dns-alias to ${CM_challenge_alias} for $_mydomain"
_params+="${CM_challenge_alias} "
else
echo "INFO: Using DNS for challenge for $_mydomain"
_params+="no "
fi
fi
......
......@@ -14,7 +14,7 @@ Without -h or --help it shows a help.
_______________________________________________________________________________
- - - ---===>>> CERT MANAGER - v2025-01-08 <<<===--- - - -
- - - ---===>>> CERT MANAGER - v2025-01-09 <<<===--- - - -
_______________________________________________________________________________
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment