mirror of
https://github.com/rootzoll/raspiblitz.git
synced 2024-11-19 09:50:19 +01:00
added retun info
This commit is contained in:
parent
427347b7d7
commit
7be9964a90
@ -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
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user