How to run custom scripts after network service restart

Hello,
I would like some help on setting up custom scripts to run after certain network events:

  1. After I manually restart the network service using /etc/init.d/network restart, I want my first script (e.g., custom.sh) to be automatically executed.
  2. Additionally, after the orange network interface (internal network) restarts (or comes up), I want a second script to run automatically.

Could you please guide me on the correct way to hook into these events in IPFire?
Where should I place my scripts, or what method should I use to achieve this?

Thank you!

:thinking: I hope this site will be helpful

Regards

1 Like

thank you @tphz.
I found the solution.
I created a file named 99-custom in /etc/init.d/networking/red.up, and my problem was resolved.

2 Likes