Closed bschlinker closed 6 years ago
OpenVPN forks into a daemon and exits with success for all run-time errors. We need to upgrade to the premium management interface experience.
Seems like we could pass an envvar to openvpn
of a tmpfile. openvpn
will pass the envvar onwards to scripts/openvpn/up.sh
. up.sh
will write something into the file indicating we're up. Then the up command returns, saying successful. It can check every 100 ms on whether the PID is dead or the file has been written to. If it takes too long, it dies, killing the PID too.
Management interface would be more premium, difficult for me to say how much more difficult though.
Might want to investigate the status-file
option too:
--status file [n]
Write operational status to file every n seconds.
I guess each client instance would have its own independent management socket? I guess that would work too. Useful for querying status for the status
interface as well.
We don't wait for OpenVPN, but the status
command now uses a management socket and is significantly more robust.
Closing in favor of https://github.com/PEERINGTestbed/client/issues/6
Check return code from OpenVPN to determine if VPN started successfully. If it doesn't, print error message along with path of logfile to check.