Run script on pppoe-client interface establish/up event

Hi,

Is it possible to catch interface events and run a script when that event occurs?

Under Linux there are if-up and if-down hooks that you can use use to run scripts if the state of an interface changes. I’ve seen the netwatch example here: http://wiki.mikrotik.com/wiki/Manual:Tools/Netwatch and also another example where you look for the change of IP address http://networkgeekstuff.com/networking/minipost-mikrotik-scripting-monitoring-interface-ip-for-changes/ These could probably work but I would prefer to have something more event driven.

I use Unotelly and would like to run the update script when the pppoe-client interface comes up, which typically means my public interface would have a new IP address. What is the best way to deal with this?

Thanks in advance
Dominique