mirror of
				https://github.com/hiskang/acme.sh
				synced 2025-10-31 02:17:18 +00:00 
			
		
		
		
	Bash does not support double equal sign (#192)
use single equal sign '=' instead.
This commit is contained in:
		
							parent
							
								
									8f63baf7e4
								
							
						
					
					
						commit
						8d5618c44a
					
				| @ -45,7 +45,7 @@ dns_cf_add(){ | |||||||
|    |    | ||||||
|   count=$(printf "$response" | grep -o \"count\":[^,]* | cut -d : -f 2) |   count=$(printf "$response" | grep -o \"count\":[^,]* | cut -d : -f 2) | ||||||
|   _debug count "$count" |   _debug count "$count" | ||||||
|   if [ "$count" == "0" ] ; then |   if [ "$count" = "0" ] ; then | ||||||
|     _info "Adding record" |     _info "Adding record" | ||||||
|     if _cf_rest POST "zones/$_domain_id/dns_records"  "{\"type\":\"TXT\",\"name\":\"$fulldomain\",\"content\":\"$txtvalue\",\"ttl\":120}"; then |     if _cf_rest POST "zones/$_domain_id/dns_records"  "{\"type\":\"TXT\",\"name\":\"$fulldomain\",\"content\":\"$txtvalue\",\"ttl\":120}"; then | ||||||
|       if printf $response | grep $fulldomain > /dev/null ; then |       if printf $response | grep $fulldomain > /dev/null ; then | ||||||
| @ -65,7 +65,7 @@ dns_cf_add(){ | |||||||
|     _debug "record_id" $record_id |     _debug "record_id" $record_id | ||||||
|      |      | ||||||
|     _cf_rest PUT "zones/$_domain_id/dns_records/$record_id"  "{\"id\":\"$record_id\",\"type\":\"TXT\",\"name\":\"$fulldomain\",\"content\":\"$txtvalue\",\"zone_id\":\"$_domain_id\",\"zone_name\":\"$_domain\"}" |     _cf_rest PUT "zones/$_domain_id/dns_records/$record_id"  "{\"id\":\"$record_id\",\"type\":\"TXT\",\"name\":\"$fulldomain\",\"content\":\"$txtvalue\",\"zone_id\":\"$_domain_id\",\"zone_name\":\"$_domain\"}" | ||||||
|     if [ "$?" == "0" ]; then |     if [ "$?" = "0" ]; then | ||||||
|       _info "Updated, sleeping 10 seconds" |       _info "Updated, sleeping 10 seconds" | ||||||
|       sleep 10 |       sleep 10 | ||||||
|       #todo: check if the record takes effect |       #todo: check if the record takes effect | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user