lnd: wait until RPC port is open

This commit is contained in:
Erik Arvstedt 2019-11-27 14:04:44 +01:00
parent 1868bef462
commit 6f2a55d63c
No known key found for this signature in database
GPG Key ID: 33312B944DD97846

View File

@ -137,6 +137,11 @@ in {
-d "{\"wallet_password\": \"$(cat /secrets/lnd-wallet-password | tr -d '\n' | base64 -w0)\"}" \
https://127.0.0.1:8080/v1/unlockwallet
fi
# Wait until the RPC port is open
while ! { exec 3>/dev/tcp/127.0.0.1/${toString cfg.rpcPort}; } &>/dev/null; do
sleep 0.1
done
'';
};
};