Instructions after port down

  • 10 April 2019
  • 1 reply

Hi! I was sitting at home and thinking about events in different games and applications like OnMouseDown, OnMouseUP, etc. Can someone tell me? Is true that routers or (and) switches have events similar to onportdown, onportup? Can I give some instructions to device in case portX will die? And how?

1 reply

Userlevel 4
You can try a `post-down` command for an interface. An example using `post-up` is in the docs here and one for `post-down` is here.

Scratch that. post-down only triggers when you deliberately take an interface down. @SorryGames what you can do is run a script with ifplugd.