Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

error #1

Open
woshichenghaibo opened this issue Mar 14, 2024 · 0 comments
Open

error #1

woshichenghaibo opened this issue Mar 14, 2024 · 0 comments

Comments

@woshichenghaibo
Copy link

#!/bin/bash
#source dns.config

1. Get current IP

IP=$(curl -s http://whatismyip.akamai.com/)
echo "$IP"

2. Create/update DNS record

curl -X POST "https://api.vercel.com/v2/domains/$DOMAIN_NAME/records"
-H "Authorization: Bearer drodDKoFAws0d2KnvQ9uL76tA"
-H "Content-Type: application/json"
-d '{
"name": "'v6.fewdrive.eu.org'",
"type": "A",
"value": "'$IP'",
"ttl": 60
}'
echo "Done!"

then

root@OpenWrt:# sh /root/ddns.sh
117.136.38.162
{"error":{"message":"Unsupported Media Type"}}curl: (3) URL rejected: Error
/root/ddns.sh: line 8: -H: not found
/root/ddns.sh: line 9: -H: not found
/root/ddns.sh: line 10: -d: not found
Done!
root@OpenWrt:
#

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant