added retun info

This commit is contained in:
/geco 2018-12-24 01:21:05 +01:00
parent 427347b7d7
commit 7be9964a90
2 changed files with 20 additions and 2 deletions

View File

@ -396,7 +396,9 @@ case $CHOICE in
;;
X)
lncli -h
echo "SUCH WOW come back with ./00mainMenu.sh"
echo "OK you now on the command line."
echo "You can return to the main menu with the command:"
echo "raspiblitz"
;;
R)
./00mainMenu.sh

View File

@ -26,8 +26,24 @@ https://github.com/rootzoll/raspiblitz
Password C will be stored on the device.
" 13 52 2>./.tmp
passwordC=$( cat ./.tmp )
# test if empty
if [ ${#passwordC} -eq 0 ]; then
echo "FAIL input cannot be empty"
echo "CANCEL input cannot be empty"
sleep 3
exit 1
fi
# test if correct
echo "testing password"
sudo systemctl restart lnd
sleep 4
result=$(sudo python /home/admin/config.scripts/lnd.unlock.py ${passwordC})
invalid=$(echo "${result}" | grep -c 'invalid')
if [ ${invalid} -gt 0 ];then
echo "PASSWORD C is wrong - try again or cancel"
sleep 3
sudo /home/admin/config.scripts/lnd.autounlock.sh on
exit 1
fi
shred ./.tmp