LCD: show JoinMarket stats if the Yield Generator is running (#1605)

This commit is contained in:
openoms
2020-09-30 22:11:45 +01:00
committed by rootzoll
parent 090604a7f1
commit fa09759be4
2 changed files with 20 additions and 2 deletions

View File

@@ -281,6 +281,24 @@ else
fi
fi
# show JoinMarket stats in place of the LND URI only if the Yield Generator is running
source /home/joinmarket/joinin.conf
if [ $(sudo -u joinmarket pgrep -f "python yg-privacyenhanced.py $YGwallet --wallet-password-stdin" 2>/dev/null | wc -l) -gt 2 ]; then
JMstats=$(mktemp 2>/dev/null)
sudo -u joinmarket /home/joinmarket/info.stats.sh > $JMstats
JMstatsL1=$(sed -n 1p < "$JMstats")
JMstatsL2=$(sed -n 2p < "$JMstats")
JMstatsL3=$(sed -n 3p < "$JMstats")
JMstatsL4=$(sed -n 4p < "$JMstats")
lastLine="\
${color_gray} ${color_gray}$JMstatsL1
${color_gray} ${color_gray}$JMstatsL2
${color_gray} ${color_gray}$JMstatsL3
${color_gray} ${color_gray}$JMstatsL4"
else
lastLine="${color_yellow}${ln_publicColor}${ln_external}${color_gray}"
fi
sleep 5
## get uptime and current date & time
@@ -307,7 +325,7 @@ ${color_yellow} ${color_gray}LND ${color_green}${ln_version} ${ln_
${color_yellow} ${color_gray}${ln_channelInfo} ${ln_peersInfo}
${color_yellow} ${color_gray}${ln_feeReport}
${color_yellow}
${color_yellow}${ln_publicColor}${ln_external}${color_gray}
$lastLine
" \
"RaspiBlitz v${codeVersion}" \
"-------------------------------------------" \

View File

@@ -125,7 +125,7 @@ if [ "$1" = "1" ] || [ "$1" = "on" ]; then
sudo -u joinmarket git clone https://github.com/openoms/joininbox.git /home/joinmarket/joininbox
# check the latest at:
# https://github.com/openoms/joininbox/releases/
sudo -u joinmarket git reset --hard v0.1.6
sudo -u joinmarket git reset --hard v0.1.7
sudo -u joinmarket cp /home/joinmarket/joininbox/scripts/* /home/joinmarket/
sudo -u joinmarket cp /home/joinmarket/joininbox/scripts/.* /home/joinmarket/ 2>/dev/null
sudo chmod +x /home/joinmarket/*.sh