From 0c4833645b1494e537a0430db79ffa8252de6c38 Mon Sep 17 00:00:00 2001 From: Alper Kanat Date: Wed, 24 Mar 2021 01:03:31 +0300 Subject: [PATCH] Update dyndns.sh --- dyndns.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/dyndns.sh b/dyndns.sh index 325658a..f389b2d 100755 --- a/dyndns.sh +++ b/dyndns.sh @@ -51,11 +51,13 @@ while ( true ); do if [[ -z $record_id ]]; then echo "No record found with '$sub' domain name. Creating record, sending data=$data to url=$url" + new_record=$(curl -s -X POST \ -H "Content-Type: application/json" \ -H "Authorization: Bearer $DIGITALOCEAN_TOKEN" \ -d "$data" \ "$url") + record_data=$(echo $new_record| jq -r ".data") fi