Page 1 of 1

OpenVPN Exit status

Posted: Wed Feb 13, 2019 3:16 pm
by rashod
Hello!
The problem is as follows:
It is required to determine the success of the connection, analyzing the return code, but when using the command

Code: Select all

openvpn --config path2config.ovpn
the output to the console stops at "Initialization Sequence Completed" and until I interrupt the process (Ctrl+C) I cannot perform any actions (in fact, all I want to do is echo $?).
If you use the "--daemon" option, then "echo $?" always returns "0", regardless of whether the connection is established or not.
Has anyone come across such a problem?