implement waiting for opevpn interface to come up

This commit is contained in:
litinoveweedle
2026-02-04 19:33:05 +01:00
parent 6759f66a8a
commit 30123292aa

View File

@@ -361,6 +361,16 @@ _openvpn_up() {
--up-restart \
--route-nopull \
--route-noexec" || return 1
#wait for slow OpenVPN interface to come up
for i in {1..10}; do
if ip link show "${config["Interface"]}" > /dev/null 2>&1 ; then
return 0
fi
sleep 2
done
bashio::log.error "OpenVPN interface ${config["Interface"]} failed to come up."
return 1
}
_openvpn_down() {