Fixing variable use in curl PUT
This commit is contained in:
1 parent
da8938d211
commit
afc41f75b8
1 file changed
+1
-1
+1
-1
@@ -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-Email: $AUTH_EMAIL" \
|
||||||
-H "X-Auth-Key: $CLOUDFLARE_API_KEY" \
|
-H "X-Auth-Key: $CLOUDFLARE_API_KEY" \
|
||||||
-H "Content-Type: application/json" \
|
-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
|
if [ $(echo "$RESPONSE" | grep '"success":true' | wc -l) -eq 1 ]; then
|
||||||
echo "$DATE|IP:$IP|CF Update: Success"
|
echo "$DATE|IP:$IP|CF Update: Success"
|
||||||
|
|||||||
Reference in new issue
Block a user