From cfdaff5a46ed6bbd4ea716a1e6f0dc8b79a1bdf7 Mon Sep 17 00:00:00 2001
From: neil <pc@byneil.com>
Date: Thu, 22 Sep 2016 20:36:33 +0800
Subject: [PATCH] fix cf

---
 dnsapi/dns_cf.sh | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/dnsapi/dns_cf.sh b/dnsapi/dns_cf.sh
index 23dea1c8..7cd286a1 100755
--- a/dnsapi/dns_cf.sh
+++ b/dnsapi/dns_cf.sh
@@ -48,7 +48,7 @@ dns_cf_add(){
   if [ "$count" = "0" ] ; then
     _info "Adding record"
     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 -- "%s" "$response" | grep $fulldomain > /dev/null ; then
         _info "Added, sleeping 10 seconds"
         sleep 10
         #todo: check if the record takes effect