scripts/rest_api/hosting.de/ddns_hostingde.sh

12 lines
353 B
Bash
Raw Normal View History

2024-05-02 01:35:19 +02:00
#!/bin/sh
ttl=300
ip=${1}
contents="[{\"content\":\"${ip}\"}]"
curl -fs \
-X POST -H "Content-Type: application/json" \
-d "{\"authToken\":\"${password}\",\"hostname\":\"${domain}\",\"recordType\":\"A\",\"rrSetContents\":${contents},\"removeAllRecords\":\"true\"}" \
"https://secure.hosting.de/api/dns/v1/json/resourceRecordSetUpdate"