dhcp - get new IP when lease renewed
For reasons I won't bore everyone with I want to run a shell script when my IP changes both at boot time and when the lease is renewed.
The man page for dhcpcd documents a -c switch which would appear to do the job at boot time.
Does anyone know if dhcpcd will also call the script when the IP changes at lease renewal time ?
The man page says:-
-c filename
Specifies the command file which is invoked when
dhcpcd successfully gets an IP address.
I interpret this to mean this to mean that <filename> will be called whenever the assigned IP changes.
Anyone know if this assumption is correct?
Kind Regards
Chris
|