Add wait condition to only start proxy after VPN is online

This commit is contained in:
Ethan Paul 2024-07-05 18:21:22 -04:00
parent 65fd3bf8a2
commit 9829fa4465
Signed by: enpaul
GPG Key ID: 9B6D99E4CFA31867

View File

@ -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