From 9829fa4465a947e7f5727b10cf8a6a7ff825d363 Mon Sep 17 00:00:00 2001 From: Ethan Paul Date: Fri, 5 Jul 2024 18:21:22 -0400 Subject: [PATCH] Add wait condition to only start proxy after VPN is online --- run-danted.sh | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/run-danted.sh b/run-danted.sh index 9700b84..817a96b 100644 --- a/run-danted.sh +++ b/run-danted.sh @@ -6,4 +6,9 @@ $DANTE_LISTEN_PORT $DANTE_FORWARD_INTERFACE ' < /etc/dante/danted.conf.template > /etc/dante/danted.conf -sockd -f /etc/dante/danted.conf +if ip address show $DANTE_FORWARD_INTERFACE&>/dev/null; then + sockd -f /etc/dante/danted.conf +else + echo "Waiting for interface $DANTE_FORWARD_INTERFACE to come online..." + sleep 5 +fi