From 24cbf3de37b6eb0085388e8d42ffe938779159ec Mon Sep 17 00:00:00 2001 From: Jason Date: Tue, 14 Mar 2017 17:06:23 -0500 Subject: [PATCH] Update dns_infoblox.sh --- dns_infoblox.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/dns_infoblox.sh b/dns_infoblox.sh index 0bfa82e6..d3490017 100644 --- a/dns_infoblox.sh +++ b/dns_infoblox.sh @@ -24,7 +24,7 @@ dns_infoblox_add() { result=`curl -k -u $Infoblox_Creds -X POST $baseurlnObject` -if [[ $result =~ record:txt/.*:.*/default ]]; then +if [ $result =~ record:txt/.*:.*/default ]; then echo "Successfully created the txt record" return 0 else @@ -50,13 +50,13 @@ echo $baseurlnObject result=`curl -k -u $Infoblox_Creds -X GET $baseurlnObject` -if [[ $result =~ record:txt/.*:.*/default ]]; then +if [ $result =~ record:txt/.*:.*/default ]; then # Extract object ref 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` # Check if rm succeeded - if [[ $rmResult =~ record:txt/.*:.*/default ]]; then + if [ $rmResult =~ record:txt/.*:.*/default ]; then echo "Successfully deleted $objRef" return 0 else