After looking at the docs for hotplug (https://openwrt.org/docs/guide-user/base-system/hotplug) and the forum I am still not sure how to do this.
My public IPv4 is dynamic and my WAN interface is set to DHCP client. What I want to do is when the DHCP lease is renewed then a script is executed with a hit on my DNS server's API with the new IPv4 that has been assigned.
From what I understand it's a matter of adding a shell script in the corresponding folder in
/etc/hotplug.d. But my first question is what is the corresponding folder for the DHCP client, which I believe is
udhcpc? And how can I know what that folder should be?
Then I understand I need to match an action that would trigger a command. So in this case I guess the action would be
renew but I'm not sure and again, I don't know how I can find this information.
And last, the command that I want to execute needs the new IPv4 address that has been assigned. I guess this is something I can find in the environment variables that are passed to the script but what is this variable called?
Thanks a lot for any help!