mirror of
https://github.com/plantroon/acme.sh.git
synced 2024-11-20 05:11:43 +00:00
Fix code style problems
This commit is contained in:
parent
c7116d40ca
commit
f90f8824bb
@ -22,7 +22,6 @@ dns_simply_add() {
|
|||||||
_simply_save_config
|
_simply_save_config
|
||||||
|
|
||||||
_debug "First detect the root zone"
|
_debug "First detect the root zone"
|
||||||
|
|
||||||
if ! _get_root "$fulldomain"; then
|
if ! _get_root "$fulldomain"; then
|
||||||
_err "invalid domain"
|
_err "invalid domain"
|
||||||
return 1
|
return 1
|
||||||
@ -68,19 +67,19 @@ dns_simply_rm() {
|
|||||||
return 1
|
return 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
records=$(echo "$response" | tr '{' "\n" | grep 'record_id\|type\|data\|\name' | sed 's/\"record_id/;\"record_id/' | tr "\n" ' '| tr -d ' ' | tr ';' ' ')
|
records=$(echo "$response" | tr '{' "\n" | grep 'record_id\|type\|data\|\name' | sed 's/\"record_id/;\"record_id/' | tr "\n" ' ' | tr -d ' ' | tr ';' ' ')
|
||||||
|
|
||||||
nr_of_deleted_records=0
|
nr_of_deleted_records=0
|
||||||
_info "Fetching txt record"
|
_info "Fetching txt record"
|
||||||
|
|
||||||
for record in $records; do
|
for record in $records; do
|
||||||
_debug record "$record"
|
_debug record "$record"
|
||||||
|
|
||||||
record_data=$(echo "$record" | cut -d "," -f 3 | sed 's/"//g' | grep "data" | cut -d ":" -f 2)
|
|
||||||
record_type=$(echo "$record" | cut -d "," -f 4 | sed 's/"//g' | grep "type" | cut -d ":" -f 2)
|
|
||||||
|
|
||||||
_debug2 record_data "$record_data"
|
record_data=$(echo "$record" | cut -d "," -f 3 | sed 's/"//g' | grep "data" | cut -d ":" -f 2)
|
||||||
_debug2 record_type "$record_type"
|
record_type=$(echo "$record" | cut -d "," -f 4 | sed 's/"//g' | grep "type" | cut -d ":" -f 2)
|
||||||
|
|
||||||
|
_debug2 record_data "$record_data"
|
||||||
|
_debug2 record_type "$record_type"
|
||||||
|
|
||||||
if [ "$record_data" = "$txtvalue" ] && [ "$record_type" = "TXT" ]; then
|
if [ "$record_data" = "$txtvalue" ] && [ "$record_type" = "TXT" ]; then
|
||||||
|
|
||||||
@ -98,7 +97,7 @@ dns_simply_rm() {
|
|||||||
|
|
||||||
nr_of_deleted_records=1
|
nr_of_deleted_records=1
|
||||||
break
|
break
|
||||||
else
|
else
|
||||||
_err "Fetching record_id could not be done, this should not happen, exiting function. Failing record is $record"
|
_err "Fetching record_id could not be done, this should not happen, exiting function. Failing record is $record"
|
||||||
break
|
break
|
||||||
fi
|
fi
|
||||||
@ -107,7 +106,7 @@ dns_simply_rm() {
|
|||||||
done
|
done
|
||||||
|
|
||||||
if [ "$nr_of_deleted_records" -eq 0 ]; then
|
if [ "$nr_of_deleted_records" -eq 0 ]; then
|
||||||
_err "No record deleted, the DNS record needs to be removed manually."
|
_err "No record deleted, the DNS record needs to be removed manually."
|
||||||
else
|
else
|
||||||
_info "Deleted $nr_of_deleted_records record"
|
_info "Deleted $nr_of_deleted_records record"
|
||||||
fi
|
fi
|
||||||
|
Loading…
Reference in New Issue
Block a user