Mac OS can't reconnect VPN automatically by default once it is disconnected.
This script enables it to reconnect VPN automatically.
Execute setup.sh like the following bash command in your mac-vpn-reconnection directory.
cd mac-vpn-reconnection
bash setup.sh YOUR_VPN_NAME
Execute kill_vpn_reconnection.sh like the following bash command in your mac-vpn-reconnection directory.
cd mac-vpn-reconnection
bash kill_vpn_reconnection.sh YOUR_VPN_NAME
This YOUR_VPN_NAME is optional.
You can delete your reconnection settings without stopping your VPN connection when you execute the command like bash kill_vpn_reconnection.sh without your VPN name.
Execute the following command.
launchctl list | grep reconnectvpn
Output example:
(PID Status Label)
- 0 reconnectvpn
Nothing is output if your reconnection settings are not set.
Make sure that you execute setup.sh in your mac-vpn-reconnection directory if you get the following output like Status is 127.
(PID Status Label)
- 127 reconnectvpn
This script must be executed after you move to your mac-vpn-reconnection directory by executing cd command.