I have an OpenSUSE server that I want to always be using a VPN. I have openvpn running as a service in /etc/init.d/openvpn. It is setup to run at boot and everything works properly. My issue arrises when I lose network connectivity for a bit or when a network cable is unplugged. After this the network is just down. If I restart OpenVPN everything works properly.
I’ve tried adding ‘/etc/init.d/openvpn restart’ to the end of ‘/etc/init.d/network’. However this doesn’t seem to work properly.
What is the best way to restart OpenVPN if the network connectivity drops and is regained? Or am I approaching this all wrong?