mirror of
https://github.com/plantroon/acme.sh.git
synced 2024-12-22 21:21:42 +00:00
Fixing code style according to Travis
This commit is contained in:
parent
7588fc0989
commit
30283282d2
@ -39,7 +39,6 @@ dns_dnsimple_add() {
|
|||||||
|
|
||||||
_get_records "$_account_id" "$_domain" "$_sub_domain"
|
_get_records "$_account_id" "$_domain" "$_sub_domain"
|
||||||
|
|
||||||
# if [ "$_records_count" = "0" ]; then
|
|
||||||
_info "Adding record"
|
_info "Adding record"
|
||||||
if _dnsimple_rest POST "$_account_id/zones/$_domain/records" "{\"type\":\"TXT\",\"name\":\"$_sub_domain\",\"content\":\"$txtvalue\",\"ttl\":120}"; then
|
if _dnsimple_rest POST "$_account_id/zones/$_domain/records" "{\"type\":\"TXT\",\"name\":\"$_sub_domain\",\"content\":\"$txtvalue\",\"ttl\":120}"; then
|
||||||
if printf -- "%s" "$response" | grep "\"name\":\"$_sub_domain\"" >/dev/null; then
|
if printf -- "%s" "$response" | grep "\"name\":\"$_sub_domain\"" >/dev/null; then
|
||||||
@ -51,22 +50,6 @@ dns_dnsimple_add() {
|
|||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
_err "Add txt record error."
|
_err "Add txt record error."
|
||||||
# else
|
|
||||||
# _info "Updating record"
|
|
||||||
# _extract_record_id "$_records" "$_sub_domain"
|
|
||||||
|
|
||||||
# if _dnsimple_rest \
|
|
||||||
# PATCH \
|
|
||||||
# "$_account_id/zones/$_domain/records/$_record_id" \
|
|
||||||
# "{\"type\":\"TXT\",\"name\":\"$_sub_domain\",\"content\":\"$txtvalue\",\"ttl\":120}"; then
|
|
||||||
|
|
||||||
# _info "Updated!"
|
|
||||||
# return 0
|
|
||||||
# fi
|
|
||||||
|
|
||||||
# _err "Update error"
|
|
||||||
# return 1
|
|
||||||
# fi
|
|
||||||
}
|
}
|
||||||
|
|
||||||
# fulldomain
|
# fulldomain
|
||||||
@ -87,8 +70,7 @@ dns_dnsimple_rm() {
|
|||||||
|
|
||||||
_extract_record_id "$_records" "$_sub_domain"
|
_extract_record_id "$_records" "$_sub_domain"
|
||||||
if [ "$_record_id" ]; then
|
if [ "$_record_id" ]; then
|
||||||
echo "$_record_id" | while read -r item
|
echo "$_record_id" | while read -r item; do
|
||||||
do
|
|
||||||
if _dnsimple_rest DELETE "$_account_id/zones/$_domain/records/$item"; then
|
if _dnsimple_rest DELETE "$_account_id/zones/$_domain/records/$item"; then
|
||||||
_info "removed record" "$item"
|
_info "removed record" "$item"
|
||||||
return 0
|
return 0
|
||||||
|
Loading…
Reference in New Issue
Block a user