mirror of
https://github.com/alexbelgium/hassio-addons.git
synced 2026-06-05 07:14:08 +02:00
implement waiting for opevpn interface to come up
This commit is contained in:
@@ -361,6 +361,16 @@ _openvpn_up() {
|
|||||||
--up-restart \
|
--up-restart \
|
||||||
--route-nopull \
|
--route-nopull \
|
||||||
--route-noexec" || return 1
|
--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() {
|
_openvpn_down() {
|
||||||
|
|||||||
Reference in New Issue
Block a user