mirror of
https://github.com/acmesh-official/acme.sh.git
synced 2025-05-08 07:54:13 +00:00
Update dns_infoblox.sh
This commit is contained in:
parent
aa2a5134ab
commit
24cbf3de37
@ -24,7 +24,7 @@ dns_infoblox_add() {
|
|||||||
|
|
||||||
result=`curl -k -u $Infoblox_Creds -X POST $baseurlnObject`
|
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"
|
echo "Successfully created the txt record"
|
||||||
return 0
|
return 0
|
||||||
else
|
else
|
||||||
@ -50,13 +50,13 @@ echo $baseurlnObject
|
|||||||
|
|
||||||
result=`curl -k -u $Infoblox_Creds -X GET $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
|
# 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 [[ $rmResult =~ record:txt/.*:.*/default ]]; then
|
if [ $rmResult =~ record:txt/.*:.*/default ]; then
|
||||||
echo "Successfully deleted $objRef"
|
echo "Successfully deleted $objRef"
|
||||||
return 0
|
return 0
|
||||||
else
|
else
|
||||||
|
Loading…
x
Reference in New Issue
Block a user