1
0
Fork 0
mirror of https://github.com/tunix/digitalocean-dyndns synced 2024-05-04 08:43:37 +00:00

Update dyndns.sh

This commit is contained in:
Alper Kanat 2021-03-24 01:03:31 +03:00 committed by GitHub
parent 928616e9e0
commit 0c4833645b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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