Monitor linux openvpn daemon and restart if disconnected
Last updated by Shayne M on May 22, 2013 08:35
Below is a bash script that you can setup with cron to monitor your linux openvpn daemon and restart if the connection happens to fail.
ps -ef | grep -v grep | grep openvpn
if [ $? -eq 1 ] ; then
/usr/sbin/openvpn --config username.ovpn --daemon --script-security 3 system
VPNSecure Provides Secure VPN servers in over 45+ Countries
If you are a looking for a versatile easy to use VPN service, checkout Today