I have installed Ubuntu 20 server in my Raspberry pi board which I have connected with Wifi. I have installed a 3G Dongle to the ubuntu server. Now the 3G Dongle connection is also working fine. Right now, what I need to do is When the Wifi is down it should automatically connect to 3G Dongle and once the Wifi is back it should connect to the Wifi again.
I don't have a clue on how to do this do we need to write any script to switch the connection between two automatically. Could anyone pls help me on this? Thanks in advance.