mirror of
https://github.com/aipeach/cloudflare-api-v4-ddns.git
synced 2025-01-18 22:09:28 +08:00
commit
dbca9fbf3e
@ -137,7 +137,7 @@ RESPONSE=$(curl -s -X PUT "https://api.cloudflare.com/client/v4/zones/$CFZONE_ID
|
|||||||
-H "Content-Type: application/json" \
|
-H "Content-Type: application/json" \
|
||||||
--data "{\"id\":\"$CFZONE_ID\",\"type\":\"$CFRECORD_TYPE\",\"name\":\"$CFRECORD_NAME\",\"content\":\"$WAN_IP\", \"ttl\":$CFTTL}")
|
--data "{\"id\":\"$CFZONE_ID\",\"type\":\"$CFRECORD_TYPE\",\"name\":\"$CFRECORD_NAME\",\"content\":\"$WAN_IP\", \"ttl\":$CFTTL}")
|
||||||
|
|
||||||
if [ "$RESPONSE" != "${RESPONSE%success*}" ] && [ $(echo $RESPONSE | grep "\"success\":true") != "" ]; then
|
if [ "$RESPONSE" != "${RESPONSE%success*}" ] && [ "$(echo $RESPONSE | grep "\"success\": true")" != "" ]; then
|
||||||
echo "Updated succesfuly!"
|
echo "Updated succesfuly!"
|
||||||
echo $WAN_IP > $WAN_IP_FILE
|
echo $WAN_IP > $WAN_IP_FILE
|
||||||
exit
|
exit
|
||||||
|
Loading…
x
Reference in New Issue
Block a user