-
Notifications
You must be signed in to change notification settings - Fork 32
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
Cannot update it #2
Comments
me too |
the api was slightly changed by godaddy to use square brackets around put requests like so: |
The Update= line works to update the DNS entry, however it always says it fails (and gives no reason as to why), and always updates even if the entry matches the current IP. |
I've written a pull request to fix that but it hasn't been approved yet |
Tested the changes and yes, that resolves the fail/success issue, however it will still run even if the IP does not need to be changed. The Check= line is not parsing the json properly to get ONLY the IP, and thus it does not match. |
it should be writing your old IP to /tmp/current_ip and comparing that - do you have write access to that file? does it contain your cached IP? |
It is cached, however my server randomly reboots from time to time, deleting the temp file. If I remove that, it fails the check and forces an update even if the IP is the same as the DNS entry. |
ah ok, maybe change the path of the file to somewhere it wont be deleted - '~/current_ip' perhaps |
That solution only covers up the problem that the Check= line is malformed and fails 100% of the time. I've mocked up a solution: This uses jq (json parser utility) to pull out the data variable, but you need to strip out the square-braces so it can do so. Hacky, but it works so far. |
it's actually designed to overwrite any existing DNS entry, is it a problem if it writes the same DNS as the existing entry? |
Why poll GoDaddy for the IP assigned, but then ignore the result? A wasted query. Also, it isn't a problem to overwrite with identical information, but it can easily be avoided. |
you're right, I'd missed your point initially |
Should be resolved now |
@fexofenadine Thanks for your pull requests! |
Glad to help out! |
hi,
i do not know if godaddy changed API recently, your script is not working recently. the error just showing "fail". i was able to use your script to update ddns.
thanks
ET
The text was updated successfully, but these errors were encountered: