Commit cdec38ba authored by seidler2547's avatar seidler2547 Committed by Stefan Seidel
Browse files

return error if any removal failed

parent 1cb6e9e7
...@@ -30,14 +30,16 @@ dns_do_rm() { ...@@ -30,14 +30,16 @@ dns_do_rm() {
_cookiejar="$(_mktemp)" _cookiejar="$(_mktemp)"
if _dns_do_authenticate; then if _dns_do_authenticate; then
if _dns_do_list_rrs; then if _dns_do_list_rrs; then
_dns_do_had_error=0
for _rrid in ${_rr_list}; do for _rrid in ${_rr_list}; do
_info "Deleting resource record $_rrid for $_domain" _info "Deleting resource record $_rrid for $_domain"
_dns_do_soap deleteRR origin "${_domain}" rrid "${_rrid}" _dns_do_soap deleteRR origin "${_domain}" rrid "${_rrid}"
if ! _contains "${response}" '>success<'; then if ! _contains "${response}" '>success<'; then
_dns_do_had_error=1
_err "Could not delete resource record for ${_domain}, id ${_rrid}" _err "Could not delete resource record for ${_domain}, id ${_rrid}"
fi fi
done done
return 0 return _dns_do_had_error
fi fi
fi fi
return 1 return 1
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment