mirror of
https://github.com/acmesh-official/acme.sh.git
synced 2025-05-08 10:02:46 +00:00
Changed 'echo' to '_info'
Changed 'echo' to '_info' Touched up quoting variable on upper 'if' statement in the dns_infoblox_rm() function
This commit is contained in:
parent
4ee8d383df
commit
53dac094f4
@ -29,12 +29,12 @@ dns_infoblox_add() {
|
|||||||
|
|
||||||
result=`curl -k -u $Infoblox_Creds -X POST $baseurlnObject`
|
result=`curl -k -u $Infoblox_Creds -X POST $baseurlnObject`
|
||||||
|
|
||||||
if echo "$result" | grep -Eq 'record:txt/.*:.*/default'; then
|
if _info "$result" | grep -Eq 'record:txt/.*:.*/default'; then
|
||||||
echo "Successfully created the txt record"
|
_info "Successfully created the txt record"
|
||||||
return 0
|
return 0
|
||||||
else
|
else
|
||||||
echo "Error encountered during record addition"
|
_info "Error encountered during record addition"
|
||||||
echo $result
|
_info $result
|
||||||
_err $result
|
_err $result
|
||||||
return 1
|
return 1
|
||||||
fi
|
fi
|
||||||
@ -56,28 +56,28 @@ dns_infoblox_rm() {
|
|||||||
|
|
||||||
baseurlnObject="https://$Infoblox_Server/wapi/v2.2.2/record:txt?name=$fulldomain&text=$txtvalue&_return_type=xml-pretty"
|
baseurlnObject="https://$Infoblox_Server/wapi/v2.2.2/record:txt?name=$fulldomain&text=$txtvalue&_return_type=xml-pretty"
|
||||||
|
|
||||||
echo $baseurlnObject
|
_info $baseurlnObject
|
||||||
|
|
||||||
result=`curl -k -u $Infoblox_Creds -X GET $baseurlnObject`
|
result=`curl -k -u $Infoblox_Creds -X GET $baseurlnObject`
|
||||||
|
|
||||||
if echo $result | grep -Eq 'record:txt/.*:.*/default'; then
|
if _info "$result" | grep -Eq 'record:txt/.*:.*/default'; then
|
||||||
# Extract object ref
|
# 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"
|
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
|
# Check if rm succeeded
|
||||||
if echo "$rmResult" | grep -Eq 'record:txt/.*:.*/default'; then
|
if _info "$rmResult" | grep -Eq 'record:txt/.*:.*/default'; then
|
||||||
echo "Successfully deleted $objRef"
|
_info "Successfully deleted $objRef"
|
||||||
return 0
|
return 0
|
||||||
else
|
else
|
||||||
echo "Error occurred during txt record delete"
|
_info "Error occurred during txt record delete"
|
||||||
echo $rmResult
|
_info $rmResult
|
||||||
_err $rmResult
|
_err $rmResult
|
||||||
return 1
|
return 1
|
||||||
fi
|
fi
|
||||||
else
|
else
|
||||||
echo "Record to delete didn't match an existing record"
|
_info "Record to delete didn't match an existing record"
|
||||||
echo $result
|
_info $result
|
||||||
_err $result
|
_err $result
|
||||||
return 1
|
return 1
|
||||||
fi
|
fi
|
||||||
|
Loading…
x
Reference in New Issue
Block a user