Page 1 of 1

detecting when a connection is up

Posted: Fri Oct 04, 2019 4:38 am
by Skaperen
i have a script (Python3) that gets details from a config file, starts the OpenVPN process in the background, then needs to wait for the tunnel to be connected before it can finish the configuration of the whole network. is there a suggestion of how to detect it is up? pings don't work until the configuration of the network. the logs are not saved by this script. the thought i have is to test the existence of the tunnel interface. once it exists and is in the up state then the script can finish its tasks so the network can be used. does this make sense?