Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@TV4Fun
Copy link
Contributor

@TV4Fun TV4Fun commented Apr 21, 2024

This adds a protocol to send status updates without needing a Dynamic
DNS host. This is useful if you don't have a DDNS host but want to be
updated when the IP of a machine changes. Because of how ddclient is
written, it requires setting a host name, but doesn't actually do
anything with it. Let me know if there's a better way to handle this.

@rhansen rhansen force-pushed the emailonly branch 2 times, most recently from b316703 to 490fdd7 Compare May 20, 2024 05:10
@rhansen
Copy link
Member

rhansen commented May 20, 2024

Thank you for the contribution! I rebased and added a handful of changes. If you approve, I'll squash and merge.

Copy link
Contributor Author

@TV4Fun TV4Fun left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Tested on my machine and it works properly. Thank you :). One very minor quibble, I like the idea of adding some indentation to host lines after the header, but with the SUCCESS: prefix before it, the result looks a little odd. See my screenshot.
Screenshot 2024-05-20 at 6 58 03 AM

@rhansen
Copy link
Member

rhansen commented May 20, 2024

By "a little odd" do you mean that there is too much indentation? Or that it would be better to omit the SUCCESS: prefix? Feel free to tweak it yourself.

I set it to right align with a wide field so that multiple domains would align like this:

             short.example.com  192.0.2.5
  reallyreallylong.example.com  192.0.2.19

@TV4Fun
Copy link
Contributor Author

TV4Fun commented May 21, 2024

Yes, I think it looks better without the SUCCESS: prefixes. Pushed a change to do that.
Screenshot 2024-05-20 at 9 28 39 PM

@rhansen
Copy link
Member

rhansen commented May 23, 2024

@TV4Fun I rebased the branch and updated it to use the new logmsg function I added in #676. I also tweaked the commit message wording. Please take a look and let me know what you think. Please push any changes you feel are appropriate.

@TV4Fun
Copy link
Contributor Author

TV4Fun commented May 24, 2024

@rhansen, I am not sure why, but there seems to be a bug introduced in this version—and the previous one—that was not in my original submission, that if the IP address has not changed since the last update, the update causes ddclient to report

WARNING: found neither IPv4 nor IPv6 address
WARNING: Could not determine an IP for host.example.com

I am investigating.

rhansen and others added 2 commits May 25, 2024 00:38
This adds a protocol to email IP address changes without needing a
dynamic DNS service.  This is useful if you don't use a DDNS service
but want to be notified when the IP of a machine changes.
@rhansen
Copy link
Member

rhansen commented May 25, 2024

There was a bug in my infinite duration commit. I force-pushed a fix; please try again.

However, the error looks unrelated to this PR. Maybe something I recently changed on master introduced a bug? I can't reproduce your error, though the test config I'm using is very simple:

cat <<\EOF >./test.conf
protocol=emailonly \
usev4=ipv4 ipv4=192.0.2.1 \
usev6=ipv6 ipv6=2001:db8::1 \
host.example.com
EOF
make && ./ddclient --file=./test.conf --cache=./test.cache

@TV4Fun
Copy link
Contributor Author

TV4Fun commented May 25, 2024

Yes, I have been running this branch now for 24 hours and have not had the issue again, so it looks like it has been fixed. Everything else is LGTM.

@rhansen rhansen merged commit d1068be into ddclient:master May 25, 2024
@rhansen
Copy link
Member

rhansen commented May 25, 2024

Thanks for testing and thanks for the contribution!

@TV4Fun
Copy link
Contributor Author

TV4Fun commented May 25, 2024

Not at all, thank you for your improvements!

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

Successfully merging this pull request may close these issues.

2 participants