fix password input

This commit is contained in:
rootzoll 2022-06-03 20:06:42 +02:00
parent 64e6b43554
commit 63a6ea856b

View File

@ -36,9 +36,7 @@ if [ $(df | grep -c "/mnt/hdd") -gt 0 ]; then
hashedPasswordSalt=$(cat ${hashedPasswordStoragePath}/salt.txt)
echo "# hashedPasswordSalt(${hashedPasswordSalt})"
else
echo "error='hdd not mounted yet - cannot set/check blitz passwords yet'"
echo "correct=0"
exit 1
echo "# hashedPasswordSalt - not available yet (no HDD yet)"
fi
############################
@ -166,6 +164,12 @@ fi
# PASSWORD A
if [ "${abcd}" = "a" ]; then
if [ "${hashedPasswordSalt}" == "" ]; then
echo "error='hdd not mounted yet - cannot set/check blitz passwords yet'"
echo "correct=0"
exit 1
fi
newPassword=$3
# if no password given by parameter - ask by dialog
@ -251,6 +255,12 @@ if [ "${abcd}" = "a" ]; then
# PASSWORD B
elif [ "${abcd}" = "b" ]; then
if [ "${hashedPasswordSalt}" == "" ]; then
echo "error='hdd not mounted yet - cannot set/check blitz passwords yet'"
echo "correct=0"
exit 1
fi
newPassword=$3
# if no password given by parameter - ask by dialog
@ -382,6 +392,12 @@ elif [ "${abcd}" = "b" ]; then
# will change both (lnd & core lightning) if installed
elif [ "${abcd}" = "c" ]; then
if [ "${hashedPasswordSalt}" == "" ]; then
echo "error='hdd not mounted yet - cannot set/check blitz passwords yet'"
echo "correct=0"
exit 1
fi
oldPassword=$3
newPassword=$4