How do I get the openvpn CLI client to exit if the connection is refused or times out? Here's what I'm doing:
for i in `find ~/data/openvpn/Open_TCP/`; do openvpn --config $i --auth-user-pass leafy_creds --connect-retry-max 1; done
The openvpn client doesn't exit and let the for loop go on to the next iteration. I looked through the man page, but did not find any option to let it give up and exit. It just keeps retrying the first VPN server IP.
Any suggestions?