mirror of
				https://github.com/hiskang/acme.sh
				synced 2025-10-31 02:17:18 +00:00 
			
		
		
		
	formated for sh instead of bash
This commit is contained in:
		
							parent
							
								
									0b52645bb6
								
							
						
					
					
						commit
						0bd4a4f98f
					
				| @ -1,4 +1,4 @@ | |||||||
| #!/bin/bash | #!/bin/env sh | ||||||
| 
 | 
 | ||||||
| ## Infoblox API integration by Jason Keller and Elijah Tenai | ## Infoblox API integration by Jason Keller and Elijah Tenai | ||||||
| ## | ## | ||||||
| @ -43,7 +43,7 @@ dns_infoblox_add() { | |||||||
|   result=$(_post "" "$baseurlnObject" "" "POST") |   result=$(_post "" "$baseurlnObject" "" "POST") | ||||||
| 
 | 
 | ||||||
|   ## Let's see if we get something intelligible back from the unit |   ## Let's see if we get something intelligible back from the unit | ||||||
|   if echo "$result" | egrep "record:txt/.*:.*/${Infoblox_View}"; then |   if echo "$result" | egrep "record:txt/.*:.*/$Infoblox_View"; then | ||||||
|     _info "Successfully created the txt record" |     _info "Successfully created the txt record" | ||||||
|     return 0 |     return 0 | ||||||
|   else |   else | ||||||
| @ -78,12 +78,12 @@ 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=$(printf "%b" "$result" | _egrep_o "record:txt/.*:.*/${Infoblox_View}") |     objRef=$(printf "%b" "$result" | _egrep_o "record:txt/.*:.*/$Infoblox_View") | ||||||
|     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") | ||||||
|     ## Let's see if that worked |     ## Let's see if that worked | ||||||
|     if echo "$rmResult" | egrep "record:txt/.*:.*/${Infoblox_View}"; then |     if echo "$rmResult" | egrep "record:txt/.*:.*/$Infoblox_View"; then | ||||||
|       _info "Successfully deleted $objRef" |       _info "Successfully deleted $objRef" | ||||||
|       return 0 |       return 0 | ||||||
|     else |     else | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user