echo added

This commit is contained in:
Roger Sikorski 2022-08-01 22:41:50 +02:00
parent 6d2237fb79
commit 02ce78927c
2 changed files with 4 additions and 2 deletions

View File

@ -33,7 +33,7 @@ echo "currentIp:" $currentIp
if [ $dnsIp != $currentIp ];
then
# echo "Ips are not equal" ## debug
echo "Ips are not equal"
request='[{"data":"'$currentIp'","name":"'$name'","ttl":600,"type":"A"}]'
# echo $request # debug
nresult=$(curl -i -s -X PUT \
@ -41,4 +41,5 @@ if [ $dnsIp != $currentIp ];
-H "Content-Type: application/json" \
-d $request "https://api.godaddy.com/v1/domains/$domain/records/A/$name")
echo $nresult
echo "dns record updated"
fi

View File

@ -33,7 +33,7 @@ echo "currentIp:" $currentIp
if [ $dnsIp != $currentIp ];
then
# echo "Ips are not equal" # debug
echo "Ips are not equal"
request='[{"data":"'$currentIp'","name":"'$name'","ttl":600,"type":"AAAA"}]'
# echo $request # debug
result=$(curl -i -s -X PUT \
@ -41,4 +41,5 @@ if [ $dnsIp != $currentIp ];
-H "Content-Type: application/json" \
-d $request "https://api.godaddy.com/v1/domains/$domain/records/AAAA/$name")
echo $nresult
echo "dns record updated"
fi