mirror of
				https://github.com/hiskang/acme.sh
				synced 2025-10-31 10:27:22 +00:00 
			
		
		
		
	
						commit
						43f195160e
					
				| @ -420,6 +420,7 @@ Ok, let's issue a cert now: | |||||||
| ``` | ``` | ||||||
| acme.sh --issue --dns dns_cloudns -d example.com -d www.example.com | acme.sh --issue --dns dns_cloudns -d example.com -d www.example.com | ||||||
| ``` | ``` | ||||||
|  | The `CLOUDNS_AUTH_ID` and `CLOUDNS_AUTH_PASSWORD` will be saved in `~/.acme.sh/account.conf` and will be reused when needed. | ||||||
| 
 | 
 | ||||||
| ## 22. Use Infoblox API | ## 22. Use Infoblox API | ||||||
| 
 | 
 | ||||||
|  | |||||||
| @ -87,6 +87,7 @@ _get_root() { | |||||||
|     _debug "response" "$response" |     _debug "response" "$response" | ||||||
|     while true; do |     while true; do | ||||||
|       h=$(printf "%s" "$domain" | cut -d . -f $i-100) |       h=$(printf "%s" "$domain" | cut -d . -f $i-100) | ||||||
|  |       _debug2 "Checking domain: $h" | ||||||
|       if [ -z "$h" ]; then |       if [ -z "$h" ]; then | ||||||
|         if _contains "$response" "<IsTruncated>true</IsTruncated>" && _contains "$response" "<NextMarker>"; then |         if _contains "$response" "<IsTruncated>true</IsTruncated>" && _contains "$response" "<NextMarker>"; then | ||||||
|           _debug "IsTruncated" |           _debug "IsTruncated" | ||||||
| @ -102,23 +103,23 @@ _get_root() { | |||||||
|           fi |           fi | ||||||
|         fi |         fi | ||||||
|         #not valid |         #not valid | ||||||
|  |         _err "Invalid domain" | ||||||
|         return 1 |         return 1 | ||||||
|       fi |       fi | ||||||
| 
 | 
 | ||||||
|       if _contains "$response" "<Name>$h.</Name>"; then |       if _contains "$response" "<Name>$h.</Name>"; then | ||||||
|         hostedzone="$(echo "$response" | sed 's/<HostedZone>/#&/g' | tr '#' '\n' | _egrep_o "<HostedZone><Id>[^<]*<.Id><Name>$h.<.Name>.*<PrivateZone>false<.PrivateZone>.*<.HostedZone>")" |         hostedzone="$(echo "$response" | sed 's/<HostedZone>/#&/g' | tr '#' '\n' | _egrep_o "<HostedZone><Id>[^<]*<.Id><Name>$h.<.Name>.*<PrivateZone>false<.PrivateZone>.*<.HostedZone>")" | ||||||
|         _debug hostedzone "$hostedzone" |         _debug hostedzone "$hostedzone" | ||||||
|         if [ -z "$hostedzone" ]; then |         if [ "$hostedzone" ]; then | ||||||
|           _err "Error, can not get hostedzone." |           _domain_id=$(printf "%s\n" "$hostedzone" | _egrep_o "<Id>.*<.Id>" | head -n 1 | _egrep_o ">.*<" | tr -d "<>") | ||||||
|  |           if [ "$_domain_id" ]; then | ||||||
|  |             _sub_domain=$(printf "%s" "$domain" | cut -d . -f 1-$p) | ||||||
|  |             _domain=$h | ||||||
|  |             return 0 | ||||||
|  |           fi | ||||||
|  |           _err "Can not find domain id: $h" | ||||||
|           return 1 |           return 1 | ||||||
|         fi |         fi | ||||||
|         _domain_id=$(printf "%s\n" "$hostedzone" | _egrep_o "<Id>.*<.Id>" | head -n 1 | _egrep_o ">.*<" | tr -d "<>") |  | ||||||
|         if [ "$_domain_id" ]; then |  | ||||||
|           _sub_domain=$(printf "%s" "$domain" | cut -d . -f 1-$p) |  | ||||||
|           _domain=$h |  | ||||||
|           return 0 |  | ||||||
|         fi |  | ||||||
|         return 1 |  | ||||||
|       fi |       fi | ||||||
|       p=$i |       p=$i | ||||||
|       i=$(_math "$i" + 1) |       i=$(_math "$i" + 1) | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user