sn_channel_cron condtion to ensure sn_lnd conns to router_lnd (#2192)
Co-authored-by: Keyan <34140557+huumn@users.noreply.github.com>
This commit is contained in:
parent
f5dff4b0bb
commit
0002c0a0f6
@ -356,7 +356,9 @@ services:
|
||||
ofelia.job-exec.sn_channel_cron.schedule: "@every 1m"
|
||||
ofelia.job-exec.sn_channel_cron.command: >
|
||||
su lnd -c bash -c "
|
||||
if [ $$(lncli getinfo | jq '.num_active_channels + .num_pending_channels') -ge 3 ]; then
|
||||
if [ $$(lncli getinfo | jq '.num_active_channels + .num_pending_channels') -ge 6 ]; then
|
||||
exit 0
|
||||
elif [ $$(lncli listchannels --peer=$ROUTER_LND_PUBKEY | jq '.channels | length') -ge 3 ]; then
|
||||
exit 0
|
||||
else
|
||||
lncli openchannel --node_key=$ROUTER_LND_PUBKEY --connect router_lnd:9735 --sat_per_vbyte 1 \\
|
||||
|
Loading…
x
Reference in New Issue
Block a user