mirror of
https://github.com/acmesh-official/acme.sh.git
synced 2025-07-12 11:01:03 +00:00
Saved environment vars into config file, shortened module to dgon, lowered some debug levels
This commit is contained in:
@ -21,7 +21,7 @@
|
|||||||
## Create the text record for validation.
|
## Create the text record for validation.
|
||||||
## Usage: fulldomain txtvalue
|
## Usage: fulldomain txtvalue
|
||||||
## EG: "_acme-challenge.www.other.domain.com" "XKrxpRBosdq0HG9i01zxXp5CPBs"
|
## EG: "_acme-challenge.www.other.domain.com" "XKrxpRBosdq0HG9i01zxXp5CPBs"
|
||||||
dns_digitalocean_add() {
|
dns_dgon_add() {
|
||||||
fulldomain=$1
|
fulldomain=$1
|
||||||
txtvalue=$2
|
txtvalue=$2
|
||||||
_info "Using digitalocean dns validation - add record"
|
_info "Using digitalocean dns validation - add record"
|
||||||
@ -29,6 +29,10 @@ dns_digitalocean_add() {
|
|||||||
_debug txtvalue "$txtvalue"
|
_debug txtvalue "$txtvalue"
|
||||||
_debug DO_DOMAIN_START "$DO_DOMAIN_START"
|
_debug DO_DOMAIN_START "$DO_DOMAIN_START"
|
||||||
|
|
||||||
|
## save the env vars (key and domain split location) for later automated use
|
||||||
|
_saveaccountconf DO_API_KEY "$DO_API_KEY"
|
||||||
|
_saveaccountconf DO_DOMAIN_START "$DO_DOMAIN_START"
|
||||||
|
|
||||||
## split the domain for DO API
|
## split the domain for DO API
|
||||||
if ! _get_base_domain "$fulldomain" "$DO_DOMAIN_START"; then
|
if ! _get_base_domain "$fulldomain" "$DO_DOMAIN_START"; then
|
||||||
_err "invalid domain or split"
|
_err "invalid domain or split"
|
||||||
@ -55,7 +59,7 @@ dns_digitalocean_add() {
|
|||||||
_err "error in response: $response"
|
_err "error in response: $response"
|
||||||
return 1
|
return 1
|
||||||
fi
|
fi
|
||||||
_debug response "$response"
|
_debug2 response "$response"
|
||||||
|
|
||||||
## finished correctly
|
## finished correctly
|
||||||
return 0
|
return 0
|
||||||
@ -64,7 +68,7 @@ dns_digitalocean_add() {
|
|||||||
## Remove the txt record after validation.
|
## Remove the txt record after validation.
|
||||||
## Usage: fulldomain txtvalue
|
## Usage: fulldomain txtvalue
|
||||||
## EG: "_acme-challenge.www.other.domain.com" "XKrxpRBosdq0HG9i01zxXp5CPBs"
|
## EG: "_acme-challenge.www.other.domain.com" "XKrxpRBosdq0HG9i01zxXp5CPBs"
|
||||||
dns_digitalocean_rm() {
|
dns_dgon_rm() {
|
||||||
fulldomain=$1
|
fulldomain=$1
|
||||||
txtvalue=$2
|
txtvalue=$2
|
||||||
_info "Using digitalocean dns validation - remove record"
|
_info "Using digitalocean dns validation - remove record"
|
||||||
@ -104,7 +108,7 @@ dns_digitalocean_rm() {
|
|||||||
_err "no record and no nextpage in digital ocean DNS removal"
|
_err "no record and no nextpage in digital ocean DNS removal"
|
||||||
return 1
|
return 1
|
||||||
fi
|
fi
|
||||||
_debug nextpage "$nextpage"
|
_debug2 nextpage "$nextpage"
|
||||||
GURL="$nextpage"
|
GURL="$nextpage"
|
||||||
fi
|
fi
|
||||||
## we break out of the loop when we have a record
|
## we break out of the loop when we have a record
|
||||||
@ -127,7 +131,7 @@ dns_digitalocean_rm() {
|
|||||||
_err "error in remove response: $response"
|
_err "error in remove response: $response"
|
||||||
return 1
|
return 1
|
||||||
fi
|
fi
|
||||||
_debug response "$response"
|
_debug2 response "$response"
|
||||||
|
|
||||||
## finished correctly
|
## finished correctly
|
||||||
return 0
|
return 0
|
Reference in New Issue
Block a user