mirror of
https://github.com/acmesh-official/acme.sh.git
synced 2025-05-08 09:42:44 +00:00
_H1, _egrep_o and extraneous
This commit is contained in:
parent
fc627746c7
commit
4111a786e1
@ -28,6 +28,7 @@ dns_infoblox_add() {
|
|||||||
Infoblox_CredsEncoded=$(printf "$Infoblox_Creds" | _base64)
|
Infoblox_CredsEncoded=$(printf "$Infoblox_Creds" | _base64)
|
||||||
|
|
||||||
## Construct the HTTP Authorization header
|
## Construct the HTTP Authorization header
|
||||||
|
export _H1="Accept-Language:en-US"
|
||||||
export _H2="Authorization: Basic $Infoblox_CredsEncoded"
|
export _H2="Authorization: Basic $Infoblox_CredsEncoded"
|
||||||
|
|
||||||
## Add the challenge record to the Infoblox grid member
|
## Add the challenge record to the Infoblox grid member
|
||||||
@ -39,7 +40,6 @@ dns_infoblox_add() {
|
|||||||
return 0
|
return 0
|
||||||
else
|
else
|
||||||
_info "Error encountered during record addition"
|
_info "Error encountered during record addition"
|
||||||
_info "$result"
|
|
||||||
_err "$result"
|
_err "$result"
|
||||||
return 1
|
return 1
|
||||||
fi
|
fi
|
||||||
@ -60,6 +60,7 @@ dns_infoblox_rm() {
|
|||||||
Infoblox_CredsEncoded=$(printf "$Infoblox_Creds" | _base64)
|
Infoblox_CredsEncoded=$(printf "$Infoblox_Creds" | _base64)
|
||||||
|
|
||||||
## Construct the HTTP Authorization header
|
## Construct the HTTP Authorization header
|
||||||
|
export _H1="Accept-Language:en-US"
|
||||||
export _H2="Authorization: Basic $Infoblox_CredsEncoded"
|
export _H2="Authorization: Basic $Infoblox_CredsEncoded"
|
||||||
|
|
||||||
## Does the record exist? Let's check.
|
## Does the record exist? Let's check.
|
||||||
@ -69,7 +70,7 @@ dns_infoblox_rm() {
|
|||||||
## Let's see if we get something intelligible back from the grid
|
## Let's see if we get something intelligible back from the grid
|
||||||
if echo "$result" | egrep 'record:txt/.*:.*/default'; then
|
if echo "$result" | egrep 'record:txt/.*:.*/default'; then
|
||||||
## Extract the object reference
|
## Extract the object reference
|
||||||
objRef=$(egrep -o 'record:txt/.*:.*/default' <<<$result)
|
objRef=$(_egrep_o 'record:txt/.*:.*/default' <<<$result)
|
||||||
objRmUrl="https://$Infoblox_Server/wapi/v2.2.2/$objRef"
|
objRmUrl="https://$Infoblox_Server/wapi/v2.2.2/$objRef"
|
||||||
## Delete them! All the stale records!
|
## Delete them! All the stale records!
|
||||||
rmResult=$(_post "" "$objRmUrl" "" "DELETE")
|
rmResult=$(_post "" "$objRmUrl" "" "DELETE")
|
||||||
@ -79,13 +80,11 @@ dns_infoblox_rm() {
|
|||||||
return 0
|
return 0
|
||||||
else
|
else
|
||||||
_info "Error occurred during txt record delete"
|
_info "Error occurred during txt record delete"
|
||||||
_info "$rmResult"
|
|
||||||
_err "$rmResult"
|
_err "$rmResult"
|
||||||
return 1
|
return 1
|
||||||
fi
|
fi
|
||||||
else
|
else
|
||||||
_info "Record to delete didn't match an existing record"
|
_info "Record to delete didn't match an existing record"
|
||||||
_info "$result"
|
|
||||||
_err "$result"
|
_err "$result"
|
||||||
return 1
|
return 1
|
||||||
fi
|
fi
|
||||||
|
Loading…
x
Reference in New Issue
Block a user