So I'm on Hack The Box and at times the VPN isn't actually connected to a host after being away or doing some other tasks that may mess with the connection. I just need help making a bash script that will.
- ping a previously specified IP address.
- Run the command again to restart the VPN
- Ping the IP address in the background persistently or every few seconds and give a message if the connection is lost.