mirror of
				https://github.com/hiskang/acme.sh
				synced 2025-10-31 02:17:18 +00:00 
			
		
		
		
	
						commit
						6304566603
					
				
							
								
								
									
										12
									
								
								acme.sh
									
									
									
									
									
								
							
							
						
						
									
										12
									
								
								acme.sh
									
									
									
									
									
								
							| @ -3543,11 +3543,11 @@ issue() { | |||||||
|         if [ "$d_api" ]; then |         if [ "$d_api" ]; then | ||||||
|           _info "Found domain api file: $d_api" |           _info "Found domain api file: $d_api" | ||||||
|         else |         else | ||||||
|           _err "Add the following TXT record:" |           _info "$(__red "Add the following TXT record:")" | ||||||
|           _err "Domain: '$(__green "$txtdomain")'" |           _info "$(__red  "Domain: '$(__green "$txtdomain")'")" | ||||||
|           _err "TXT value: '$(__green "$txt")'" |           _info "$(__red  "TXT value: '$(__green "$txt")'")" | ||||||
|           _err "Please be aware that you prepend _acme-challenge. before your domain" |           _info "$(__red  "Please be aware that you prepend _acme-challenge. before your domain")" | ||||||
|           _err "so the resulting subdomain will be: $txtdomain" |           _info "$(__red  "so the resulting subdomain will be: $txtdomain")" | ||||||
|           continue |           continue | ||||||
|         fi |         fi | ||||||
| 
 | 
 | ||||||
| @ -3583,7 +3583,7 @@ issue() { | |||||||
|       _debug "Dns record not added yet, so, save to $DOMAIN_CONF and exit." |       _debug "Dns record not added yet, so, save to $DOMAIN_CONF and exit." | ||||||
|       _err "Please add the TXT records to the domains, and retry again." |       _err "Please add the TXT records to the domains, and retry again." | ||||||
|       _clearup |       _clearup | ||||||
|       _on_issue_err "$_post_hook" "$vlist" |       _on_issue_err "$_post_hook" | ||||||
|       return 1 |       return 1 | ||||||
|     fi |     fi | ||||||
| 
 | 
 | ||||||
|  | |||||||
| @ -168,21 +168,26 @@ _namecom_get_root() { | |||||||
|   i=2 |   i=2 | ||||||
|   p=1 |   p=1 | ||||||
| 
 | 
 | ||||||
|   if _namecom_rest GET "domain/list"; then |   if ! _namecom_rest GET "domain/list"; then | ||||||
|     while true; do |     return 1 | ||||||
|       host=$(printf "%s" "$domain" | cut -d . -f $i-100) |  | ||||||
|       if [ -z "$host" ]; then |  | ||||||
|         return 1 |  | ||||||
|       fi |  | ||||||
| 
 |  | ||||||
|       if _contains "$response" "$host"; then |  | ||||||
|         _sub_domain=$(printf "%s" "$domain" | cut -d . -f 1-$p) |  | ||||||
|         _domain="$host" |  | ||||||
|         return 0 |  | ||||||
|       fi |  | ||||||
|       p=$i |  | ||||||
|       i=$(_math "$i" + 1) |  | ||||||
|     done |  | ||||||
|   fi |   fi | ||||||
|  | 
 | ||||||
|  |   # Need to exclude the last field (tld) | ||||||
|  |   numfields=$(echo "$domain" | _egrep_o "\." | wc -l) | ||||||
|  |   while [ $i -le "$numfields" ]; do | ||||||
|  |     host=$(printf "%s" "$domain" | cut -d . -f $i-100) | ||||||
|  |     _debug host "$host" | ||||||
|  |     if [ -z "$host" ]; then | ||||||
|  |       return 1 | ||||||
|  |     fi | ||||||
|  | 
 | ||||||
|  |     if _contains "$response" "$host"; then | ||||||
|  |       _sub_domain=$(printf "%s" "$domain" | cut -d . -f 1-$p) | ||||||
|  |       _domain="$host" | ||||||
|  |       return 0 | ||||||
|  |     fi | ||||||
|  |     p=$i | ||||||
|  |     i=$(_math "$i" + 1) | ||||||
|  |   done | ||||||
|   return 1 |   return 1 | ||||||
| } | } | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user