File tree Expand file tree Collapse file tree 1 file changed +8
-5
lines changed Expand file tree Collapse file tree 1 file changed +8
-5
lines changed Original file line number Diff line number Diff line change 6666 lightningd " ${lnopt[@]} " $( echo " $RPC_OPT " | sed -r ' s/(^| )-/\1--bitcoin-/g' ) > /dev/null &
6767fi
6868
69- if [ ! -S /etc/lightning/lightning-rpc ]; then
69+ LN_NET_PATH=$LN_PATH /$NETWORK
70+
71+ if [ ! -S $LN_NET_PATH /lightning-rpc ]; then
7072 echo -n " waiting for RPC unix socket... "
71- sed --quiet ' /^lightning-rpc$/ q' <( inotifywait -e create,moved_to --format ' %f' -qm $LN_PATH )
73+ sed --quiet ' /^lightning-rpc$/ q' <( inotifywait -e create,moved_to --format ' %f' -qm $LN_NET_PATH )
7274fi
75+ sleep 0.5
7376
7477if command -v lightning-cli > /dev/null; then
75- lightning-cli --rpc-file=$LN_PATH /lightning-rpc getinfo > /dev/null
78+ lightning-cli --rpc-file=$LN_NET_PATH /lightning-rpc getinfo > /dev/null
7679 echo -n " c-lightning RPC ready."
7780fi
7881
7982echo -e " \nStarting Lightning Charge"
8083
8184if [ -z " $STANDALONE " ]; then
8285 # when not in standalone mode, run spark-wallet as an additional background job
83- charged -d /data/charge.db -l $LN_PATH -i 0.0.0.0 " $@ " $CHARGED_OPTS &
86+ charged -d /data/charge.db -l $LN_NET_PATH -i 0.0.0.0 " $@ " $CHARGED_OPTS &
8487
8588 # shutdown the entire process when any of the background jobs exits (even if successfully)
8689 wait -n
8790 kill -TERM $$
8891else
89- exec charged -d /data/charge.db -l $LN_PATH -i 0.0.0.0 " $@ " $CHARGED_OPTS
92+ exec charged -d /data/charge.db -l $LN_NET_PATH -i 0.0.0.0 " $@ " $CHARGED_OPTS
9093fi
You can’t perform that action at this time.
0 commit comments