Ethernet "on up", "on down" script trigger

search on forum my event handler

You can adapt it,
even something that checks the logs.

I don't have time to do it directly today, but I'd start with that myself.