mirror of
				https://github.com/hiskang/acme.sh
				synced 2025-10-31 10:27:22 +00:00 
			
		
		
		
	dns_kinghost.sh :: changed printf to echo
This commit is contained in:
		
							parent
							
								
									6787c81abe
								
							
						
					
					
						commit
						aa9975ad0d
					
				| @ -39,14 +39,14 @@ dns_kinghost_add() { | |||||||
| 
 | 
 | ||||||
|     #This API call returns "status":"ok" if dns record does not exists |     #This API call returns "status":"ok" if dns record does not exists | ||||||
|     #We are creating a new txt record here, so we expect the "ok" status |     #We are creating a new txt record here, so we expect the "ok" status | ||||||
|     if ! printf "%s" "$response" | grep '"status":"ok"' >/dev/null; then |     if ! echo "$response" | grep '"status":"ok"' >/dev/null; then | ||||||
|         _err "Error" |         _err "Error" | ||||||
|         _err "$response" |         _err "$response" | ||||||
|         return 1 |         return 1 | ||||||
|     fi |     fi | ||||||
| 
 | 
 | ||||||
|     _kinghost_rest POST "dns" "name=$fulldomain&content=$txtvalue" |     _kinghost_rest POST "dns" "name=$fulldomain&content=$txtvalue" | ||||||
|     if ! printf "%s" "$response" | grep '"status":"ok"' >/dev/null; then |     if ! echo "$response" | grep '"status":"ok"' >/dev/null; then | ||||||
|         _err "Error" |         _err "Error" | ||||||
|         _err "$response" |         _err "$response" | ||||||
|         return 1 |         return 1 | ||||||
| @ -76,14 +76,14 @@ dns_kinghost_rm() { | |||||||
| 
 | 
 | ||||||
|     #This API call returns "status":"ok" if dns record does not exists |     #This API call returns "status":"ok" if dns record does not exists | ||||||
|     #We are removing a txt record here, so the record must exists |     #We are removing a txt record here, so the record must exists | ||||||
|     if printf "%s" "$response" | grep '"status":"ok"' >/dev/null; then |     if echo "$response" | grep '"status":"ok"' >/dev/null; then | ||||||
|         _err "Error" |         _err "Error" | ||||||
|         _err "$response" |         _err "$response" | ||||||
|         return 1 |         return 1 | ||||||
|     fi |     fi | ||||||
| 
 | 
 | ||||||
|     _kinghost_rest DELETE "dns" "name=$fulldomain&content=$txtvalue" |     _kinghost_rest DELETE "dns" "name=$fulldomain&content=$txtvalue" | ||||||
|     if ! printf "%s" "$response" | grep '"status":"ok"' >/dev/null; then |     if ! echo "$response" | grep '"status":"ok"' >/dev/null; then | ||||||
|         _err "Error" |         _err "Error" | ||||||
|         _err "$response" |         _err "$response" | ||||||
|         return 1 |         return 1 | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user