Fixing variable use in curl PUT

This commit is contained in:
rich committed 2021-02-06 12:50:16 -05:00
1 parent da8938d211
commit afc41f75b8
1 file changed
+1 -1
+1 -1
View File
@@ -18,7 +18,7 @@ RESPONSE=$(curl -s -X PUT "https://api.cloudflare.com/client/v4/zones/$ZONE_ID/d
-H "X-Auth-Email: $AUTH_EMAIL" \
-H "X-Auth-Key: $CLOUDFLARE_API_KEY" \
-H "Content-Type: application/json" \
--data '{"type":"$RECORD_TYPE","name":"$RECORD_NAME","content":"'$IP'","ttl":$TTL}')
--data '{"type":"$RECORD_TYPE","name":"'$RECORD_NAME'","content":"'$IP'","ttl":'$TTL'}')
if [ $(echo "$RESPONSE" | grep '"success":true' | wc -l) -eq 1 ]; then
echo "$DATE|IP:$IP|CF Update: Success"