The following shell script will check your Raspberry Pi (RPI) openvpn connection periodically and automatically restart openvpn if the connection has stopped working. Handy when using RPI OpenVPN with Private Internet Access (PIA) and if you have connection instability.