mirror of
				https://github.com/hiskang/acme.sh
				synced 2025-10-31 10:27:22 +00:00 
			
		
		
		
	Fix digitalocean api not remove record
This commit is contained in:
		
							parent
							
								
									9f80909f6a
								
							
						
					
					
						commit
						e75b56073b
					
				| @ -92,11 +92,11 @@ dns_dgon_rm() { | ||||
|     domain_list="$(_get "$GURL")" | ||||
|     ## 2) find record | ||||
|     ## check for what we are looing for: "type":"A","name":"$_sub_domain" | ||||
|     record="$(echo "$domain_list" | _egrep_o "\"id\"\s*\:\s*\"*\d+\"*[^}]*\"name\"\s*\:\s*\"$_sub_domain\"[^}]*\"data\"\s*\:\s*\"$txtvalue\"")" | ||||
|     record="$(echo "$domain_list" | _egrep_o "\"id\"\s*\:\s*\"*[[:digit:]]+\"*[^}]*\"name\"\s*\:\s*\"$_sub_domain\"[^}]*\"data\"\s*\:\s*\"$txtvalue\"")" | ||||
|     ## 3) check record and get next page | ||||
|     if [ -z "$record" ]; then | ||||
|       ## find the next page if we dont have a match | ||||
|       nextpage="$(echo "$domain_list" | _egrep_o "\"links\".*" | _egrep_o "\"next\".*" | _egrep_o "http.*page\=\d+")" | ||||
|       nextpage="$(echo "$domain_list" | _egrep_o "\"links\".*" | _egrep_o "\"next\".*" | _egrep_o "http.*page\=[[:digit:]]+")" | ||||
|       if [ -z "$nextpage" ]; then | ||||
|         _err "no record and no nextpage in digital ocean DNS removal" | ||||
|         return 1 | ||||
| @ -108,7 +108,7 @@ dns_dgon_rm() { | ||||
|   done | ||||
| 
 | ||||
|   ## we found the record | ||||
|   rec_id="$(echo "$record" | _egrep_o "id\"\s*\:\s*\"*\d+" | _egrep_o "\d+")" | ||||
|   rec_id="$(echo "$record" | _egrep_o "id\"\s*\:\s*\"*[[:digit:]]+" | _egrep_o "[[:digit:]]+")" | ||||
|   _debug rec_id "$rec_id" | ||||
| 
 | ||||
|   ## delete the record | ||||
|  | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user