File tree Expand file tree Collapse file tree 4 files changed +7
-5
lines changed
Expand file tree Collapse file tree 4 files changed +7
-5
lines changed Original file line number Diff line number Diff line change 6161
6262# If no existing record, create a new TXT record, otherwise edit the existing record
6363if [[ " $resp " == * \" data\" :[]* ]]; then
64- request_params=" &cpanel_jsonapi_func=add_zone_record&domain=$domain &type=TXT&name=_acme-challenge$name &txtdata=$token "
64+ request_params=" &cpanel_jsonapi_func=add_zone_record&domain=${ domain} &type=TXT&name=_acme-challenge&txtdata=${ token} "
6565else
6666 # shellcheck disable=SC2001
6767 line=$( echo " $resp " | sed -e ' s/.*line":\([0-9]*\),.*/\1/' )
68- request_params=" &cpanel_jsonapi_func=edit_zone_record&domain=$domain &type=TXT&name=_acme-challenge$name &txtdata=${token} &line=${line} "
68+ request_params=" &cpanel_jsonapi_func=edit_zone_record&domain=${ domain} &type=TXT&name=_acme-challenge&txtdata=${token} &line=${line} "
6969fi
7070resp=$( curl --silent " ${curl_params[@]} " " $request_func$request_params " )
7171
Original file line number Diff line number Diff line change 5858line=$( echo " $resp " | sed -e ' s/.*line":\([0-9]*\),.*/\1/' )
5959if [[ " $line " != " " ]]; then
6060 # Delete the challenge token
61- request_params=" &cpanel_jsonapi_func=remove_zone_record&domain=$domain &type=TXT&name=_acme-challenge$name &line=$line "
61+ request_params=" &cpanel_jsonapi_func=remove_zone_record&domain=${ domain} &type=TXT&name=_acme-challenge&line=${ line} "
6262 resp=$( curl --silent " ${curl_params[@]} " " $request_func$request_params " )
6363fi
6464
Original file line number Diff line number Diff line change 293293# 2024-03-26 Test for "true" in wildcard property of authorization responses
294294# 2024-10-16 Add newlines to /directory response (#765)(#859)
295295# 2025-06-18 Support profiles
296+ # 2025-12-02 Fix cPanel support for API zone record updates and wildcard domain support
296297# ----------------------------------------------------------------------------------------
297298
298299case :$SHELLOPTS : in
301302
302303PROGNAME=${0##*/ }
303304PROGDIR=" $( cd " $( dirname " $0 " ) " || exit ; pwd -P; ) "
304- VERSION=" 2.49 "
305+ VERSION=" 2.50 "
305306
306307# defaults
307308ACCOUNT_KEY_LENGTH=4096
Original file line number Diff line number Diff line change 55# use with RELOAD_CMD="${HOME}/cpanel_cert_upload domain.com"
66
77domain=" $1 "
8+ nowild=$( echo " ${1// \*\. / } " )
89
910rawurlencode () {
1011 local string
@@ -28,4 +29,4 @@ ecert=$( rawurlencode "${HOME}/.getssl/${domain}/${domain}.crt" )
2829ekey=$( rawurlencode " ${HOME} /.getssl/${domain} /${domain} .key" )
2930echain=$( rawurlencode " ${HOME} /.getssl/${domain} /chain.crt" )
3031
31- uapi SSL install_ssl domain=" ${domain } " cert=" ${ecert} " key=" ${ekey} " cabundle=" ${echain} "
32+ uapi SSL install_ssl domain=" ${nowild } " cert=" ${ecert} " key=" ${ekey} " cabundle=" ${echain} "
You can’t perform that action at this time.
0 commit comments