Browse Source

added retun info

dev
/geco 6 years ago
parent
commit
7be9964a90
  1. 4
      home.admin/00mainMenu.sh
  2. 18
      home.admin/config.scripts/lnd.autounlock.sh

4
home.admin/00mainMenu.sh

@ -396,7 +396,9 @@ case $CHOICE in
;; ;;
X) X)
lncli -h 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) R)
./00mainMenu.sh ./00mainMenu.sh

18
home.admin/config.scripts/lnd.autounlock.sh

@ -26,8 +26,24 @@ https://github.com/rootzoll/raspiblitz
Password C will be stored on the device. Password C will be stored on the device.
" 13 52 2>./.tmp " 13 52 2>./.tmp
passwordC=$( cat ./.tmp ) passwordC=$( cat ./.tmp )
# test if empty
if [ ${#passwordC} -eq 0 ]; then 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 exit 1
fi fi
shred ./.tmp shred ./.tmp

Loading…
Cancel
Save