mirror of
https://github.com/acmesh-official/acme.sh.git
synced 2025-05-10 14:12:43 +00:00
Merge branch 'plesk' of https://github.com/romanlum/acme.sh into plesk
This commit is contained in:
commit
416516e61f
@ -7,7 +7,6 @@
|
||||
#
|
||||
#PLESK_Password="xxxx@sss.com"
|
||||
|
||||
|
||||
######## Public functions #####################
|
||||
|
||||
#Usage: add _acme-challenge.www.domain.com "XKrxpRBosdIKFzxW_CT3KLZNf6q0HG9i01zxXp5CPBs"
|
||||
@ -58,7 +57,7 @@ dns_plesk_rm() {
|
||||
}
|
||||
|
||||
#################### Private functions below ##################################
|
||||
function init_config(){
|
||||
init_config() {
|
||||
PLESK_Host="${PLESK_Host:-$(_readaccountconf_mutable PLESK_Host)}"
|
||||
PLESK_User="${PLESK_User:-$(_readaccountconf_mutable PLESK_User)}"
|
||||
PLESK_Password="${PLESK_Password:-$(_readaccountconf_mutable PLESK_Password)}"
|
||||
@ -79,7 +78,7 @@ function init_config(){
|
||||
|
||||
}
|
||||
|
||||
function plesk_api() {
|
||||
plesk_api() {
|
||||
request="$1"
|
||||
|
||||
export _H1="HTTP_AUTH_LOGIN: $PLESK_User"
|
||||
@ -93,7 +92,7 @@ function plesk_api() {
|
||||
|
||||
}
|
||||
|
||||
function add_txt_record() {
|
||||
add_txt_record() {
|
||||
site_id=$1
|
||||
subdomain=$2
|
||||
txt_value=$3
|
||||
@ -111,7 +110,7 @@ function add_txt_record() {
|
||||
return 0
|
||||
}
|
||||
|
||||
function del_txt_record() {
|
||||
del_txt_record() {
|
||||
site_id=$1
|
||||
fulldomain="${2}."
|
||||
|
||||
@ -138,7 +137,7 @@ function del_txt_record() {
|
||||
}
|
||||
|
||||
#fetches the domain list for the given account
|
||||
function get_domain_list() {
|
||||
get_domain_list() {
|
||||
request='<packet><customer><get-domain-list><filter></filter></get-domain-list></customer></packet>'
|
||||
|
||||
plesk_api "$request"
|
||||
@ -154,7 +153,7 @@ function get_domain_list() {
|
||||
}
|
||||
|
||||
#fetches all dns records fo rthe given sit
|
||||
function get_dns_record_list() {
|
||||
get_dns_record_list() {
|
||||
siteid=$1
|
||||
request="<packet><dns><get_rec><filter><site-id>$siteid</site-id></filter></get_rec></dns></packet>"
|
||||
|
||||
@ -164,8 +163,8 @@ function get_dns_record_list() {
|
||||
return 1
|
||||
fi
|
||||
|
||||
_plesk_dns_host=($(echo "${response}" | sed -nr 's_<host>(.*)</host>_\1_p'));
|
||||
_plesk_dns_ids=($(echo "${response}"| sed -nr 's_<id>(.*)</id>_\1_p'));
|
||||
_plesk_dns_host=($(echo "${response}" | sed -nr 's_<host>(.*)</host>_\1_p'))
|
||||
_plesk_dns_ids=($(echo "${response}"| sed -nr 's_<id>(.*)</id>_\1_p'))
|
||||
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user