From b30f5c0be70c7a11b29f25d2fed73fd37d63922e Mon Sep 17 00:00:00 2001 From: Jason Date: Thu, 16 Mar 2017 08:52:32 -0500 Subject: [PATCH] More formatting --- dns_infoblox.sh | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/dns_infoblox.sh b/dns_infoblox.sh index 9714b1bf..e279fd1b 100644 --- a/dns_infoblox.sh +++ b/dns_infoblox.sh @@ -36,7 +36,7 @@ dns_infoblox_add() { _info "Error encountered during record addition" _info "$result" _err "$result" - return 1 + return 1 fi } @@ -62,19 +62,19 @@ dns_infoblox_rm() { if _info "$result" | egrep 'record:txt/.*:.*/default'; then # Extract object ref - objRef=`grep -Po 'record:txt/.*:.*/default' <<< $result` + objRef=$(grep -Po 'record:txt/.*:.*/default' <<< $result) objRmUrl="https://$Infoblox_Server/wapi/v2.2.2/$objRef" - rmResult=`curl -k -u $Infoblox_Creds -X DELETE $objRmUrl` + rmResult=$(curl -k -u $Infoblox_Creds -X DELETE $objRmUrl) # Check if rm succeeded - if _info "$rmResult" | egrep 'record:txt/.*:.*/default'; then - _info "Successfully deleted $objRef" - return 0 - else - _info "Error occurred during txt record delete" - _info "$rmResult" - _err "$rmResult" - return 1 - fi + if _info "$rmResult" | egrep 'record:txt/.*:.*/default'; then + _info "Successfully deleted $objRef" + return 0 + else + _info "Error occurred during txt record delete" + _info "$rmResult" + _err "$rmResult" + return 1 + fi else _info "Record to delete didn't match an existing record" _info "$result"