From b19fe67ab913c321dd1ccd370c0520e3d876cafa Mon Sep 17 00:00:00 2001 From: Hobby-Student <6012744+Hobby-Student@users.noreply.github.com> Date: Thu, 4 Aug 2022 08:43:50 +0200 Subject: [PATCH] better handling of response --- dnsapi/dns_kas.sh | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/dnsapi/dns_kas.sh b/dnsapi/dns_kas.sh index 3555f9ab..85906730 100755 --- a/dnsapi/dns_kas.sh +++ b/dnsapi/dns_kas.sh @@ -56,8 +56,12 @@ dns_kas_add() { _debug2 "##KAS## response" "$response" if _contains "$response" ""; then - _err "##KAS## An error occurred, please check manually." - return 1 + if _contains "$response" "record_already_exists"; then + _info "##KAS## The record already exists, which must not be a problem. Please check manually." + else + _err "##KAS## An error occurred, please check manually." + return 1 + fi elif ! _contains "$response" "ReturnStringTRUE"; then _err "##KAS## An unknown error occurred, please check manually." return 1