mirror of
https://github.com/acmesh-official/acme.sh.git
synced 2026-01-15 04:42:12 +08:00
Fixes to follow coding standards.
This commit is contained in:
@@ -7,7 +7,7 @@
|
||||
# Due to the fact that DuckDNS uses StartSSL as cert provider, --insecure must be used with acme.sh
|
||||
|
||||
DuckDNS_API="https://www.duckdns.org/update"
|
||||
API_Params="domains=$DuckDNS_domain&token=$DuckDNS_token"
|
||||
API_Params="domains=$DuckDNS_Domain&token=$DuckDNS_Token"
|
||||
|
||||
######## Public functions #####################
|
||||
|
||||
@@ -17,23 +17,23 @@ dns_duckdns_add() {
|
||||
txtvalue=$2
|
||||
|
||||
# We'll extract the domain/username from full domain
|
||||
DuckDNS_domain=$(printf "%s\n" "$fulldomain" | rev | cut -d . -f 3 | rev)
|
||||
DuckDNS_Domain=$(echo $fulldomain | _lower_case | _egrep_o '.[^.]*.duckdns.org' | cut -d . -f 2)
|
||||
|
||||
if [ -z "$DuckDNS_domain" ]; then
|
||||
if [ -z "$DuckDNS_Domain" ]; then
|
||||
_err "Error extracting the domain."
|
||||
return 1
|
||||
fi
|
||||
|
||||
if [ -z "$DuckDNS_token" ]; then
|
||||
DuckDNS_token=""
|
||||
if [ -z "$DuckDNS_Token" ]; then
|
||||
DuckDNS_Token=""
|
||||
_err "The token for your DuckDNS account is necessary."
|
||||
_err "You can look it up in your DuckDNS account."
|
||||
return 1
|
||||
fi
|
||||
|
||||
# Now save the credentials.
|
||||
_saveaccountconf DuckDNS_domain "$DuckDNS_domain"
|
||||
_saveaccountconf DuckDNS_token "$DuckDNS_token"
|
||||
_saveaccountconf DuckDNS_Domain "$DuckDNS_Domain"
|
||||
_saveaccountconf DuckDNS_Token "$DuckDNS_Token"
|
||||
|
||||
# Unfortunately, DuckDNS does not seems to support lookup domain through API
|
||||
# So I assume your credentials (which are your domain and token) are correct
|
||||
@@ -86,6 +86,6 @@ _duckdns_rest() {
|
||||
return 1
|
||||
fi
|
||||
|
||||
_debug response "$response"
|
||||
_debug2 response "$response"
|
||||
return 0
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user