1

I have 2 interfaces: the Ethernet (metrics 1) and 4G (metrics 2). When the first disappears the second is used, when the Ethernet comes back, the first one is used again. I would like to send a notification (run the script send.sh) when the metrics (indeed route) is changed, eg, "Ethernet is temporary unavailable, using 4G data" and "Ethernet comes back".

I use Ubuntu 22.04 with NetworkManager.

I would like to create a system service, which may listen to the route state and send notifications when it changes its metric/route.

Please, help me to understand how to do that. Thanks!

0

You must log in to answer this question.

Browse other questions tagged .