mirror of
https://github.com/raspiblitz/raspiblitz.git
synced 2025-04-12 21:59:19 +02:00
fix password input
This commit is contained in:
parent
64e6b43554
commit
63a6ea856b
@ -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
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user