I have an unstable WiFi connection, and the bandwidth frequently reaches 0 without actual disconnection (it is connected but without data transfer). Resetting the network manager by
sudo service network-manager restart
perfectly fixes the problem. However, I have two issues:
- How can I reset the network manager without a downtime? With the above command, any ongoing download will be interrupted. Is it possible to keep the current connection while resetting?
- How can I write a bash script to periodically check the network connection and reset it if there is no data transfer?
I use Ubuntu 20.04.