removed redundant api call
This commit is contained in:
parent
37bc099d39
commit
2d1d512d0f
@ -71,17 +71,6 @@ dns_kinghost_rm() {
|
|||||||
return 1
|
return 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
_debug "Getting txt records"
|
|
||||||
_kinghost_rest GET "dns" "name=$fulldomain&content=$txtvalue"
|
|
||||||
|
|
||||||
#This API call returns "status":"ok" if dns record does not exists
|
|
||||||
#We are removing a txt record here, so the record must exists
|
|
||||||
if echo "$response" | grep '"status":"ok"' >/dev/null; then
|
|
||||||
_err "Error"
|
|
||||||
_err "$response"
|
|
||||||
return 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
_kinghost_rest DELETE "dns" "name=$fulldomain&content=$txtvalue"
|
_kinghost_rest DELETE "dns" "name=$fulldomain&content=$txtvalue"
|
||||||
if ! echo "$response" | grep '"status":"ok"' >/dev/null; then
|
if ! echo "$response" | grep '"status":"ok"' >/dev/null; then
|
||||||
_err "Error"
|
_err "Error"
|
||||||
|
Loading…
Reference in New Issue
Block a user