Code: Select all
sudo service openvpn restart
After I run this command, Openvpn client connects and works properly, again.
My question is, How can I automatically reconnect to openvpn as a client on ubuntu server 20.04, after the network cable gets disconnected and reconnected, without having to manually run the command
Code: Select all
sudo service opepnvn restart
Is there some sort of script I can use or some way to instruct ubuntu to run the above command as soon as the network finds a connection again, after being disconnected?