mirror of
https://github.com/acmesh-official/acme.sh.git
synced 2025-04-29 22:52:43 +00:00
ShellCheck and shfmt correction
This commit is contained in:
parent
04e72dcfed
commit
24d36b7340
@ -95,8 +95,8 @@ _get_root() {
|
||||
i=1
|
||||
p=1
|
||||
while true; do
|
||||
_domain=$(printf "%s" "$domain" | cut -d . -f $i-100)
|
||||
_sub_domain=$(printf "%s" "$domain" | cut -d . -f 1-$p)
|
||||
_domain=$(printf "%s" "$domain" | cut -d . -f "$i"-100)
|
||||
_sub_domain=$(printf "%s" "$domain" | cut -d . -f 1-"$p")
|
||||
_debug _domain "$_domain"
|
||||
if [ -z "$_domain" ]; then
|
||||
#not valid
|
||||
@ -121,8 +121,8 @@ _get_zoneid() {
|
||||
i=1
|
||||
p=1
|
||||
while true; do
|
||||
_domain=$(printf "%s" "$domain" | cut -d . -f $i-100)
|
||||
_sub_domain=$(printf "%s" "$domain" | cut -d . -f 1-$p)
|
||||
_domain=$(printf "%s" "$domain" | cut -d . -f "$i"-100)
|
||||
_sub_domain=$(printf "%s" "$domain" | cut -d . -f 1-"$p")
|
||||
_debug _domain "$_domain"
|
||||
if [ -z "$_domain" ]; then
|
||||
#not valid
|
||||
@ -158,7 +158,7 @@ _get_recordid() {
|
||||
_debug "No records in dns"
|
||||
return 1
|
||||
fi
|
||||
if ! _contains "$_response" '\"name\":\"'$subdomain'\"'; then
|
||||
if ! _contains "$_response" '\"name\":\"'"$subdomain"'\"'; then
|
||||
_debug "Record does not exist"
|
||||
return 1
|
||||
fi
|
||||
@ -195,4 +195,4 @@ _hosttech_rest() {
|
||||
|
||||
_debug2 response "$_response"
|
||||
return 0
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user