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
Branches
No related tags found
1 merge request!30fix handling for issue with dns alias
...@@ -38,6 +38,7 @@ ...@@ -38,6 +38,7 @@
# 2023-05-08 <axel.hahn@unibe.ch> fix: "key and cert do not match" # 2023-05-08 <axel.hahn@unibe.ch> fix: "key and cert do not match"
# 2024-03-21 <axel.hahn@unibe.ch> shorter sleep times # 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-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 @@ ...@@ -47,7 +48,7 @@
# #
# ---------------------------------------------------------------------- # ----------------------------------------------------------------------
_version="2025-01-08" _version="2025-01-09"
logdir="./log" logdir="./log"
touchfile="$logdir/lastchange.txt" touchfile="$logdir/lastchange.txt"
...@@ -246,7 +247,7 @@ function _dnsCheck(){ ...@@ -246,7 +247,7 @@ function _dnsCheck(){
_wd "dig check - domain for cert" _wd "dig check - domain for cert"
_checkDig "$_mydomain" "a" "IN.*(A|CNAME)" # matches A and CNAME records _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 then
_wd "dig check - cname ${_subdomain}.${_mydomain} must exist" _wd "dig check - cname ${_subdomain}.${_mydomain} must exist"
_checkDig "${_subdomain}.${_mydomain}" "cname" _checkDig "${_subdomain}.${_mydomain}" "cname"
...@@ -603,12 +604,13 @@ function public_add(){ ...@@ -603,12 +604,13 @@ function public_add(){
else else
if [ -n "${CM_challenge_alias}" ] if [ -n "${CM_challenge_alias}" ]
then then
echo "INFO: Using DNS for challenge"
_params+=" --challenge-alias " _params+=" --challenge-alias "
if ! echo "$_mydomain" | grep "${CM_certmatch}" >/dev/null if ! echo "$_mydomain" | grep "${CM_challenge_alias}" >/dev/null
then then
echo "INFO: Using DNS for challenge with dns-alias to ${CM_challenge_alias} for $_mydomain"
_params+="${CM_challenge_alias} " _params+="${CM_challenge_alias} "
else else
echo "INFO: Using DNS for challenge for $_mydomain"
_params+="no " _params+="no "
fi fi
fi fi
......
...@@ -14,7 +14,7 @@ Without -h or --help it shows a help. ...@@ -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