[Docker] Fix: Bind socat to the right port

This commit is contained in:
nicolas.dorier
2018-06-26 09:17:53 +09:00
committed by Christian Decker
parent 50efe34e3b
commit aeafe4dbe7
3 changed files with 5 additions and 4 deletions

View File

@@ -10,8 +10,9 @@ if [ "$EXPOSE_TCP" == "true" ]; then
while read -r i; do if [ "$i" = "lightning-rpc" ]; then break; fi; done \
< <(inotifywait -e create,open --format '%f' --quiet "$LIGHTNINGD_DATA" --monitor)
echo "C-Lightning started"
echo "C-Lightning started, RPC available on port $LIGHTNINGD_RPC_PORT"
socat "TCP4-listen:$LIGHTNINGD_PORT,fork,reuseaddr" "UNIX-CONNECT:$LIGHTNINGD_DATA/lightning-rpc" &
socat "TCP4-listen:$LIGHTNINGD_RPC_PORT,fork,reuseaddr" "UNIX-CONNECT:$LIGHTNINGD_DATA/lightning-rpc" &
fg %-
else
lightningd "$@"