From 0cdcb5afb28bcaf6f17cc589ead24dbd7c57a631 Mon Sep 17 00:00:00 2001 From: eicky <172308834@qq.com> Date: Sat, 16 May 2020 15:15:45 +0800 Subject: [PATCH] fix issue #7 --- cf-v4-ddns.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cf-v4-ddns.sh b/cf-v4-ddns.sh index b4bf85d..e02feba 100644 --- a/cf-v4-ddns.sh +++ b/cf-v4-ddns.sh @@ -121,7 +121,7 @@ if [ -f $ID_FILE ] && [ $(wc -l $ID_FILE | cut -d " " -f 1) == 4 ] \ else echo "Updating zone_identifier & record_identifier" CFZONE_ID=$(curl -s -X GET "https://api.cloudflare.com/client/v4/zones?name=$CFZONE_NAME" -H "X-Auth-Email: $CFUSER" -H "X-Auth-Key: $CFKEY" -H "Content-Type: application/json" | grep -Po '(?<="id":")[^"]*' | head -1 ) - CFRECORD_ID=$(curl -s -X GET "https://api.cloudflare.com/client/v4/zones/$CFZONE_ID/dns_records?name=$CFRECORD_NAME" -H "X-Auth-Email: $CFUSER" -H "X-Auth-Key: $CFKEY" -H "Content-Type: application/json" | grep -Po '(?<="id":")[^"]*' | head -1 ) + CFRECORD_ID=$(curl -s -X GET "https://api.cloudflare.com/client/v4/zones/$CFZONE_ID/dns_records?name=$CFRECORD_NAME" -H "X-Auth-Email: $CFUSER" -H "X-Auth-Key: $CFKEY" -H "Content-Type: application/json" | grep -Po '(?<="id": ")[^"]*' | head -1 ) echo "$CFZONE_ID" > $ID_FILE echo "$CFRECORD_ID" >> $ID_FILE echo "$CFZONE_NAME" >> $ID_FILE