You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
19 lines
482 B
19 lines
482 B
7 years ago
|
#!/bin/bash
|
||
|
|
||
|
: "${EXPOSE_TCP:=false}"
|
||
|
|
||
|
if [ "$EXPOSE_TCP" == "true" ]; then
|
||
|
set -m
|
||
|
lightningd "$@" &
|
||
|
|
||
|
echo "C-Lightning starting"
|
||
|
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"
|
||
|
|
||
|
socat "TCP4-listen:$LIGHTNINGD_PORT,fork,reuseaddr" "UNIX-CONNECT:$LIGHTNINGD_DATA/lightning-rpc" &
|
||
|
fg %-
|
||
|
else
|
||
|
lightningd "$@"
|
||
|
fi
|