You should make an integration with a good utility for obtaining IP addresses from current machine such as iproute2. Getting ip address from checkip.dyndns.org is not a very good choise when you runs inadyn-mt on the same machine as your server is situated.
For example, if we have the following device interface:
# ip addr show dev ppp0
12: ppp0: <POINTOPOINT,MULTICAST,NOARP,UP,LOWER_UP> mtu 1492 qdisc htb state UNKNOWN qlen 3
link/ppp
inet 56.65.156.251 peer 56.65.156.35/32 scope global ppp0
I can easily obtain my internet IP in the following command:
PPPIP=`/sbin/ip addr show dev ppp0 | grep inet\ | gawk '{print $2}' | cut -d/ -f1`;
I'm pretty sure there's a good possibility to update it using some C functions in iproute2 or maybe even easier.
If I have a server in LAN, I need an easy update it's domain name address too. Your program can't do that right now. For example, I have the server on this address:
# ip addr show dev eth4
4: eth1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP qlen 1000
link/ether 00:16:5c:6f:89:cb brd ff:ff:ff:ff:ff:ff
inet 10.0.144.35/24 brd 10.0.144.255 scope global eth4
inet6 fe80::216:7bff:fa3f:88ca/64 scope link
valid_lft forever preferred_lft forever
I can easily obtain my local IP in the following command:
ip addr show dev eth1 | grep inet\ | gawk '{print $2}' | cut -d/ -f1`;
But I also need a possibility to automatically update this local IP (10.0.144.35) on dyndns service with inadyn-mt utility.