Update dyndns.sh
This commit is contained in:
parent
928616e9e0
commit
0c4833645b
1 changed files with 2 additions and 0 deletions
|
@ -51,11 +51,13 @@ while ( true ); do
|
||||||
|
|
||||||
if [[ -z $record_id ]]; then
|
if [[ -z $record_id ]]; then
|
||||||
echo "No record found with '$sub' domain name. Creating record, sending data=$data to url=$url"
|
echo "No record found with '$sub' domain name. Creating record, sending data=$data to url=$url"
|
||||||
|
|
||||||
new_record=$(curl -s -X POST \
|
new_record=$(curl -s -X POST \
|
||||||
-H "Content-Type: application/json" \
|
-H "Content-Type: application/json" \
|
||||||
-H "Authorization: Bearer $DIGITALOCEAN_TOKEN" \
|
-H "Authorization: Bearer $DIGITALOCEAN_TOKEN" \
|
||||||
-d "$data" \
|
-d "$data" \
|
||||||
"$url")
|
"$url")
|
||||||
|
|
||||||
record_data=$(echo $new_record| jq -r ".data")
|
record_data=$(echo $new_record| jq -r ".data")
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue