diff --git a/run.sh b/run.sh index 004cd86..2e28583 100644 --- a/run.sh +++ b/run.sh @@ -40,8 +40,6 @@ else echo "$record_identifier" >> $id_file fi -echo "Updating $zone_identifier, $record_identifier" - update=$(curl -s -X PUT "https://api.cloudflare.com/client/v4/zones/$zone_identifier/dns_records/$record_identifier" -H "X-Auth-Email: $auth_email" -H "X-Auth-Key: $auth_key" -H "Content-Type: application/json" --data "{\"id\":\"$zone_identifier\",\"type\":\"A\",\"name\":\"$record_name\",\"content\":\"$ip\"}") if [[ $update == *"\"success\":false"* ]]; then @@ -50,7 +48,7 @@ if [[ $update == *"\"success\":false"* ]]; then echo -e "$message" exit 1 else - message="IP changed to: $ip" + message="$(date) - IP changed to: $ip" echo "$ip" > $ip_file log "$message" echo "$message"