Update dns_hover.sh

Fixing format
This commit is contained in:
ddarek2000 2020-08-31 14:15:23 -04:00 committed by GitHub
parent f28540731e
commit 3f95564c06
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -18,8 +18,8 @@ HOVER_Api="https://www.hover.com/api"
#Usage: dns_hover_add _acme-challenge.domain.com "XKrxpRBosdIKFzxW_CT3KLZNf6q0HG9i01zxXp5CPBs"
dns_hover_add() {
fulldomain=$1
txtvalue=$2
fulldomain="$1"
txtvalue="$2"
_info "Using HOVER"
_debug fulldomain "$fulldomain"
@ -69,19 +69,6 @@ dns_hover_add() {
_err "Add txt record error."
fi
# else
# _info "Updating record"
# record_id=$(printf "%s\n" "$response" | _egrep_o "\"id\":\"[^\"]*\",\"name\":\"$_sub_domain\",\"type\":\"TXT\"" | tr -d \" | tr "," ":" | cut -d : -f 2 | head -n 1)
# _debug "record_id" "$record_id"
#
# _cf_rest PUT "domains/$_domain_id/dns/$record_id" "{\"id\":\"$record_id\",\"type\":\"TXT\",\"name\":\"$_sub_domain\",\"content\":\"$txtvalue\",\"zone_id\":\"$_domain_id\",\"zone_name\":\"$_domain\"}"
# if [ "$?" = "0" ]; then
# _info "Updated, OK"
# return 0
# fi
# _err "Update error"
# return 1
# verify response
if ! _contains "$response" "\"succeeded\":true"; then
_err "Error"
@ -94,8 +81,8 @@ dns_hover_add() {
#Usage: fulldomain txtvalue
#Remove the txt record after validation.
dns_hover_rm() {
fulldomain=$1
txtvalue=$2
fulldomain="$1"
txtvalue="$2"
_info "Using hover"
_debug fulldomain "$fulldomain"