#833 fix just enter key

This commit is contained in:
rootzoll 2020-01-06 22:21:47 +01:00
parent 8c6d906f5c
commit 81053857f1

View file

@ -20,7 +20,6 @@ passwordC=$2
# run interactive if 'turn on' && no further parameters
if [ "${turn}" = "on" ] && [ ${#passwordC} -eq 0 ]; then
echo "!!!CANCEL!!!" > ./.tmp
dialog --backtitle "LND Auto-Unlock" --inputbox "ENTER your PASSWORD C:
For more details see chapter in GitHub README
@ -29,20 +28,21 @@ https://github.com/rootzoll/raspiblitz
Password C will be stored on the device.
" 13 52 2>./.tmp
wasCancel=$( echo $? )
passwordC=$( cat ./.tmp )
# test if empty or CANCEL
if [ ${wasCancel} -eq 1 ]; then
echo "# CANCEL LND Auto-Unlock"
sleep 2
exit 1
fi
if [ ${#passwordC} -eq 0 ]; then
echo "# input cannot be empty - repeat"
sleep 3
sudo /home/admin/config.scripts/lnd.autounlock.sh on
exit 1
fi
if [ "${passwordC}" = "!!!CANCEL!!!" ]; then
echo "# CANCEL LND Auto-Unlock"
sleep 2
exit 1
fi
# test if correct
echo "# testing password .. please wait"