how to react on wallet lock

This commit is contained in:
rootzoll 2021-08-26 16:21:54 +02:00
parent a0db8ecfe3
commit bf50b3d1f7
2 changed files with 34 additions and 48 deletions

View File

@ -192,33 +192,26 @@ CHOICE=$(dialog --clear \
case $CHOICE in case $CHOICE in
INFO) INFO)
echo "Gathering Information (please wait) ..." echo "Gathering Information (please wait) ..."
walletLocked=$(lncli getinfo 2>&1 | grep -c "Wallet is encrypted") while :
if [ ${walletLocked} -eq 0 ]; then do
while :
do
# show the same info as on LCD screen # show the same info as on LCD screen
/home/admin/00infoBlitz.sh ${lightning} ${chain}net /home/admin/00infoBlitz.sh ${lightning} ${chain}net
# wait 6 seconds for user exiting loop # wait 6 seconds for user exiting loop
echo ""
echo -en "Screen is updating in a loop .... press 'x' now to get back to menu."
read -n 1 -t 6 keyPressed
echo -en "\rGathering information to update info ... please wait. \n"
# check if user wants to abort session
if [ "${keyPressed}" = "x" ]; then
echo "" echo ""
echo -en "Screen is updating in a loop .... press 'x' now to get back to menu." echo "Returning to menu ....."
read -n 1 -t 6 keyPressed sleep 4
echo -en "\rGathering information to update info ... please wait. \n" break
fi
# check if user wants to abort session done
if [ "${keyPressed}" = "x" ]; then
echo ""
echo "Returning to menu ....."
sleep 4
break
fi
done
else
/home/admin/00raspiblitz.sh ${lightning} ${chain}net
exit 0
fi
;; ;;
LND) LND)
/home/admin/99lndMenu.sh /home/admin/99lndMenu.sh

View File

@ -108,33 +108,26 @@ CHOICE=$(dialog --clear \
case $CHOICE in case $CHOICE in
INFO) INFO)
echo "Gathering Information (please wait) ..." echo "Gathering Information (please wait) ..."
walletLocked=$(lncli getinfo 2>&1 | grep -c "Wallet is encrypted") while :
if [ ${walletLocked} -eq 0 ]; then do
while :
do
# show the same info as on LCD screen # show the same info as on LCD screen
/home/admin/00infoBlitz.sh ${lightning} ${chain}net /home/admin/00infoBlitz.sh ${lightning} ${chain}net
# wait 6 seconds for user exiting loop # wait 6 seconds for user exiting loop
echo ""
echo -en "Screen is updating in a loop .... press 'x' now to get back to menu."
read -n 1 -t 6 keyPressed
echo -en "\rGathering information to update info ... please wait. \n"
# check if user wants to abort session
if [ "${keyPressed}" = "x" ]; then
echo "" echo ""
echo -en "Screen is updating in a loop .... press 'x' now to get back to menu." echo "Returning to menu ....."
read -n 1 -t 6 keyPressed sleep 4
echo -en "\rGathering information to update info ... please wait. \n" break
fi
# check if user wants to abort session done
if [ "${keyPressed}" = "x" ]; then
echo ""
echo "Returning to menu ....."
sleep 4
break
fi
done
else
/home/admin/00raspiblitz.sh ${lightning} ${chain}net
exit 0
fi
;; ;;
RTL) RTL)
/home/admin/config.scripts/bonus.rtl.sh menu lnd $CHAIN /home/admin/config.scripts/bonus.rtl.sh menu lnd $CHAIN